We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e68f5ca commit 7d9fd48Copy full SHA for 7d9fd48
src/audio/alsa/SDL_alsa_audio.c
@@ -356,8 +356,12 @@ static bool ALSA_WaitDevice(SDL_AudioDevice *device)
356
while (!SDL_GetAtomicInt(&device->shutdown)) {
357
const int rc = ALSA_snd_pcm_avail(device->hidden->pcm);
358
if (rc < 0) {
359
- SDL_LogError(SDL_LOG_CATEGORY_AUDIO, "ALSA wait failed (unrecoverable): %s", ALSA_snd_strerror(rc));
360
- return false;
+ const int status = ALSA_snd_pcm_recover(device->hidden->pcm, rc, 0);
+ if (status < 0) {
361
+ // Hmm, not much we can do - abort
362
+ SDL_LogError(SDL_LOG_CATEGORY_AUDIO, "ALSA wait failed (unrecoverable): %s", ALSA_snd_strerror(rc));
363
+ return false;
364
+ }
365
}
366
if (rc >= sample_frames) {
367
break;
0 commit comments