Commit 32875d3f authored by Sam Lantinga's avatar Sam Lantinga

Added an error message for when ALSA audio fails

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404120
parent e0929469
......@@ -314,8 +314,10 @@ 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 ( SDL_NAME(snd_pcm_recover)(pcm_handle, status, 0) < 0 ) {
status = SDL_NAME(snd_pcm_recover)(pcm_handle, status, 0);
if ( status < 0 ) {
/* Hmm, not much we can do - abort */
fprintf(stderr, "ALSA write failed (unrecoverable): %s", SDL_NAME(snd_strerror)(status));
this->enabled = 0;
return;
}
......
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