<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body >Ok. So does that mean that, if a subsequent decode succeeds, it's safe to use the whole buffer? In other words, if I see EAGAIN, how do I interpret the returned byte count? <br><br><br>-------- Original message --------<br>From: "Ryan C. Gordon" <icculus@icculus.org> <br>Date: 2014/01/06  23:16  (GMT-05:00) <br>To: SDL_sound mailing list <sdlsound@icculus.org> <br>Subject: Re: [sdlsound] Unclear on SDL_Sound SOUND_SAMPLEFLAG_EAGAIN <br> <br><br>On 01/05/2014 10:11 PM, Greg Toombs wrote:<br>> I'm cross-posting this to Stack Overflow -<br>> http://stackoverflow.com/questions/20942108/sdl-sound-sound-sampleflag-eagain-behaviour<br>><br>> I briefly perused the source code for SDL_Sound but, as with the above<br>> post, I'm still not sure what the flag means. Any clarification would be<br>> appreciated. Thanks folks.<br><br>It means try to decode again, it was probably a temporary problem.<br><br>For example, if you have a RWops that's pulling audio data from a web <br>server, and SDL_sound has decoded all the data available and is waiting <br>for more to come over the network, EAGAIN might get set.<br><br>If that web server unexpectedly drops the connection halfway through, <br>that won't report EAGAIN. That reports SOUND_SAMPLEFLAG_ERROR.<br><br>SOUND_SAMPLEFLAG_EAGAIN means we just couldn't finish the operation <br>right now, so we gave control back to your app instead of waiting until <br>we could.<br><br>--ryan.<br><br><br>_______________________________________________<br>sdlsound mailing list<br>sdlsound@icculus.org<br>http://icculus.org/mailman/listinfo/sdlsound<br></body>