1.1 --- a/src/audio/alsa/SDL_alsa_audio.c Mon Oct 19 05:15:21 2009 +0000
1.2 +++ b/src/audio/alsa/SDL_alsa_audio.c Mon Oct 19 05:24:48 2009 +0000
1.3 @@ -314,6 +314,11 @@
1.4 while ( frames_left > 0 && this->enabled ) {
1.5 status = SDL_NAME(snd_pcm_writei)(pcm_handle, sample_buf, frames_left);
1.6 if ( status < 0 ) {
1.7 + if ( status == -EAGAIN ) {
1.8 + /* Apparently snd_pcm_recover() doesn't handle this. Foo. */
1.9 + SDL_Delay(1);
1.10 + continue;
1.11 + }
1.12 status = SDL_NAME(snd_pcm_recover)(pcm_handle, status, 0);
1.13 if ( status < 0 ) {
1.14 /* Hmm, not much we can do - abort */