[sdlsound] Sound_seek()?

Torbjörn Andersson torbjorn.e.andersson at tietoenator.com
Thu Apr 18 02:23:33 EDT 2002

I've looked through - briefly - the decoders I feel responsible for, and 
this is what I found:


There is a ModPlug_Seek() function which should work, though the 
documentation warns that it's not always accurate and some mods will be 
missing instruments for a short time after a seek.

The seek argument is time, in milliseconds.


There is a Player_SetPosition() function, but I'm uncertain what the 
argument to it really means. It is what SDL_mixer uses to implement 
Mix_SetMusicPosition() though.


I'll just assume this will be handled the same way as the WAV decoder, 
so I'll worry about that later. :-)


FLAC 1.0.1 added a "seekable stream decoder" in addition to the already 
present stream and file decoders. This sounds like it should be possible 
to use, but I'd have to do some experimenting to tell.

The seek argument to FLAC__seekable_stream_decoder_set_absolute() is, 
apparently, a sample count.

MIDI (TiMidity)

There is a skip_to() function which ought to work, but - again - I'd 
have to experiment to say for certain.

The seek argument appears to be a time value.

TietoEnator Resource Management AB
Torbjörn Andersson

More information about the sdlsound mailing list