Commit 88ba9725 authored by Sam Lantinga's avatar Sam Lantinga

ALSA write failed (unrecoverable): Resource temporarily unavailable

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404121
parent 32875d3f
......@@ -314,6 +314,11 @@ static void ALSA_PlayAudio(_THIS)
while ( frames_left > 0 && this->enabled ) {
status = SDL_NAME(snd_pcm_writei)(pcm_handle, sample_buf, frames_left);
if ( status < 0 ) {
if ( status == -EAGAIN ) {
/* Apparently snd_pcm_recover() doesn't handle this. Foo. */
SDL_Delay(1);
continue;
}
status = SDL_NAME(snd_pcm_recover)(pcm_handle, status, 0);
if ( status < 0 ) {
/* Hmm, not much we can do - abort */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment