Problems with Rewind and seek

Eric Wing ewing2121 at
Thu Dec 12 00:36:13 EST 2002

I'm trying to use the Seek and Rewind functions, but
I'm having some problems.

For rewind, my problem seems to be specifically with
MP3's. When I start playing an MP3, I can successfully
call the rewind function and it will start over.
However, if the MP3 file finishes (hits EOF), then I
can no longer get SDL_Sound to rewind it for me. The
rewind function itself does not return any error. But
when I call Sound_Decode() right after, I get 0 bytes
decoded and the sample->flags say I'm at EOF.

So far, I've only gotten this behavior with MP3s. Has
anybody else experienced this problem, or know what
the problem might be?

For seek, I was wondering if it's possible to use seek
after you've already predecoded the the sample. I have
not had any success with this. After the sample has
been predecoded with Sound_DecodeAll, I try calling
seek, and then try calling Sound_DecodeAll (again),
but this second time, I get 0 bytes decoded. I've
tried forcing the issue, by still accessing old
sample->buffer (which was valid before the Seek
operation), but it usually results in a crash or
garbage playback.


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

More information about the sdlsound mailing list