Skip to content

Commit

Permalink
ALSA write failed (unrecoverable): Resource temporarily unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 19, 2009
1 parent 3324bba commit 4f79403
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/audio/alsa/SDL_alsa_audio.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 4f79403

Please sign in to comment.