mirror of
https://github.com/yawut/SDL.git
synced 2026-10-02 05:06:46 -05:00
Added an error message for when ALSA audio fails
--HG-- branch : SDL-1.2
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user