[sdlsound] Problems with Rewind and seek

Eric Wing ewing2121 at yahoo.com
Thu Dec 12 05:22:12 EST 2002

> Can you run "playsound --decoders" and see what MP3
> decoder is lissted
> first? I need to know if this is SMPEG or mpglib.

The SMPEG library is listed first.

> Don't use anything (except Sound_FreeSample()) on a
> DecodeAll()'d
> sample.
> Once you've got such a sample, you can manage all
> the stuff yourself:
> "rewinding"  and "seeking" become a matter of
> repositioning a memory
> pointer.

On a semirelated note, is there a way to get the total
playing time from files that aren't predecoded? I see
in some of the source code (like Ogg), you retrieve
this information for debugging purposes. Is this data
accessable anywhere else? It would be really useful to
have, even if not all files cannot provide it.

> Trying to further decode a DecodeAll()'d sample
> should return EOF. Seek
> and rewind should probably return an error without
> changing the sample's
> state (and it's probably a bug if they don't).

It seems that for Seek with DecodeAll()'d, I rarly get
an error. I've only gotten the message on one of my
ogg files (I/O error), but most of my other oggs don't
trigger any error. Wav's and MP3's also don't trigger
anything. Mod files did trigger an error, but I think
they are unseekable no matter what because they also
triggered an error with regular Decode()/Seek().

Thank you for your help,

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the sdlsound mailing list