Mercurial > sdl-ios-xcode
changeset 4362:e48a66bed093 SDL-1.2
ALSA write failed (unrecoverable): Resource temporarily unavailable
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 19 Oct 2009 05:24:48 +0000 |
parents | 991e4bcfc7a8 |
children | 028d26915548 |
files | src/audio/alsa/SDL_alsa_audio.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audio/alsa/SDL_alsa_audio.c Mon Oct 19 05:15:21 2009 +0000 +++ b/src/audio/alsa/SDL_alsa_audio.c Mon Oct 19 05:24:48 2009 +0000 @@ -314,6 +314,11 @@ 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 */