Sound_Rewind()...

Ryan C. Gordon icculus at clutteredmind.org
Thu Jan 17 15:59:28 EST 2002


...is implemented. It follows my previous proposal with a few exceptions:
the API docs now explicitly state that there's only two reasons
Sound_Rewind() will fail (RWops can't seek, or SDL_sound isn't
initialized), and if the stream can't seek, SDL_sound won't explicitly try
to close and reopen the stream...we'll leave that for applications that
use non-seekable RWops to deal with as they see fit (buffer the data,
reopen themselves, etc).

Most of the decoders are just stubbed with assertion failures at the
moment. I'll be getting around to filling these in if no one else does so.
(Look for (formatname)_rewind at the end of each decoder's source.)

Ones I've written/tested:
 wav.c (both adpcm and uncompressed)
 aiff.c
 au.c
 raw.c
 skeleton.c  (heh)

Ones I haven't:
 mikmod.c
 ogg.c
 flac.c
 modplug.c
 voc.c
 midi.c
 mp3.c
 shn.c

There's a --loop flag in playsound now for testing this. Beware that the
audio callback got ANOTHER (less severe) rewrite to handle this, so be on
the lookout for bugs there, too.

--loop works with --predecode, too, and won't call Sound_Rewind() on
predecoded (Sound_DecodeAll()) samples.

...make sure to rebuild from scratch after pulling from CVS, since
internal structure sizes have changed.

Comments, suggestions, complaints go to the usual place.

--ryan.





More information about the sdlsound mailing list