[sdlsound] need help putting it all together (sdl_sound,sdl_m ixer,physfs)

Ryan C. Gordon icculus at clutteredmind.org
Thu Dec 5 14:56:04 EST 2002


> Furthermore, I noticed that in all cases, the
> SOUND_SAMPLEFLAG_EAGAIN flag gets set on every decode
> (and I am nowhere near EOF). Is this a bad thing, or
> is it normal? Can somebody explain what this flag
> means. SOUND_SAMPLEFLAG_ERROR ever gets set.

EAGAIN means that SDL_sound couldn't fully fill your buffer without
blocking for some unreasonable time...it's not really an error, but it
will alert you of a buffer underrun. It's safe to just call Sound_Decode()
again to get more, but this gives you the opportunity to do other
processing.

It's possible that the OGG decoder is incorrectly reporting this when it
could fill the buffer more, and since playsound just calls Sound_Decode()
in a loop, we never noticed.

--ryan.






More information about the sdlsound mailing list