Sound_Seek() framework in place.
Ryan C. Gordon
icculus at clutteredmind.org
Sun Apr 21 14:48:09 EDT 2002
Ah, what the heck...I put the seek framework in place, so we just need to
fill in drivers now.
The only one that implements the seek at the moment is raw.c. Things worth
- decoders that can seek should set SOUND_SAMPLEFLAG_CANSEEK flag when
creating a new sample. This can be set on a per-sample basis (i.e. - I can
seek in this SHN, since it has a seek table, but not this one, since it
- decoders should try to retain a sane state if seek method fails (i.e. -
next decode should continue as if nothing happened, if at all
possible...don't set SOUND_SAMPLEFLAG_ERROR unless something catastrophic
- There's a convenience function: __Sound_convertMsToBytePos() to convert
milliseconds to an absolute byte position based on a Sound_AudioInfo
structure. raw.c uses this.
- All of this is completely untested. :) I've just done a quick compile
and that's all.
I'll be filling in decoder-specific seek implementations sooner or later,
(starting with my own decoders) but others are welcome to tackle these
More information about the sdlsound