diff options
| author | Autumn! <autumnull@posteo.net> | 2023-05-24 20:37:01 +0000 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2023-06-04 09:23:19 +0200 |
| commit | 93cf66cf5eec566960290da42f12bcff93c68025 (patch) | |
| tree | 95180739f2874fc1ee88f687906dc0f9e48574ea /sdl2/mixer | |
| parent | Use types::c:: instead of char and strings:: (diff) | |
| download | hare-chip8-93cf66cf5eec566960290da42f12bcff93c68025.tar.gz | |
rwops.ha: make more rigorous in order to fix various bugs
Signed-off-by: Autumn! <autumnull@posteo.net>
Diffstat (limited to 'sdl2/mixer')
| -rw-r--r-- | sdl2/mixer/samples.ha | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sdl2/mixer/samples.ha b/sdl2/mixer/samples.ha index 0a45151..ad1ecc1 100644 --- a/sdl2/mixer/samples.ha +++ b/sdl2/mixer/samples.ha @@ -13,10 +13,9 @@ export type Mix_Chunk = struct { @symbol("Mix_LoadWAV_RW") fn _Mix_LoadWAV_RW(src: *sdl2::SDL_RWops, freesrc: int) nullable *Mix_Chunk; -// Loads a sample from an [[io::handle]]. The stream will not be closed for you. +// Loads a sample from an [[io::handle]]. export fn Mix_LoadWAV_RW(src: io::handle) (*Mix_Chunk | sdl2::error) = { const rw = sdl2::rw_from_handle(src); - defer sdl2::SDL_RWclose(rw); return sdl2::wrapptr(_Mix_LoadWAV_RW(rw, 0))?: *Mix_Chunk; }; |
