Mercurial > sdl-ios-xcode
diff src/audio/SDL_wave.c @ 1465:8dfa9a6d69a5
Updated WinCE support by Dmitry (with some tweaks)
Converted the disk audio driver to SDL_RWops for portability
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 04 Mar 2006 08:24:35 +0000 |
parents | 5f52867ba65c |
children | dc6b59e925a2 |
line wrap: on
line diff
--- a/src/audio/SDL_wave.c Sat Mar 04 05:13:03 2006 +0000 +++ b/src/audio/SDL_wave.c Sat Mar 04 08:24:35 2006 +0000 @@ -550,12 +550,13 @@ if ( format != NULL ) { SDL_free(format); } - if ( freesrc && src ) { - SDL_RWclose(src); - } - else { - // seek to the end of the file (given by the RIFF chunk) - SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR); + if ( src ) { + if ( freesrc ) { + SDL_RWclose(src); + } else { + // seek to the end of the file (given by the RIFF chunk) + SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR); + } } if ( was_error ) { spec = NULL;