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
This commit is contained in:
parent
e092946988
commit
32875d3fe4
1 changed files with 3 additions and 1 deletions
|
@ -314,8 +314,10 @@ static void ALSA_PlayAudio(_THIS)
|
||||||
while ( frames_left > 0 && this->enabled ) {
|
while ( frames_left > 0 && this->enabled ) {
|
||||||
status = SDL_NAME(snd_pcm_writei)(pcm_handle, sample_buf, frames_left);
|
status = SDL_NAME(snd_pcm_writei)(pcm_handle, sample_buf, frames_left);
|
||||||
if ( status < 0 ) {
|
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 */
|
/* Hmm, not much we can do - abort */
|
||||||
|
fprintf(stderr, "ALSA write failed (unrecoverable): %s", SDL_NAME(snd_strerror)(status));
|
||||||
this->enabled = 0;
|
this->enabled = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue