mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-30 21:37:43 +08:00
Don't log an error for disconnected audio devices
This commit is contained in:
@@ -357,8 +357,8 @@ static bool ALSA_WaitDevice(SDL_AudioDevice *device)
|
|||||||
|
|
||||||
while (!SDL_GetAtomicInt(&device->shutdown) && (ALSA_snd_pcm_avail(device->hidden->pcm) < sample_frames)) {
|
while (!SDL_GetAtomicInt(&device->shutdown) && (ALSA_snd_pcm_avail(device->hidden->pcm) < sample_frames)) {
|
||||||
if (total_delays >= (fulldelay * 5)) {
|
if (total_delays >= (fulldelay * 5)) {
|
||||||
// Hmm, not much we can do - abort
|
// Hmm, not much we can do - probably disconnected, abort
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_AUDIO, "ALSA: hardware seems to have frozen, giving up on it.");
|
//SDL_LogError(SDL_LOG_CATEGORY_AUDIO, "ALSA: hardware seems to have frozen, giving up on it.");
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
SDL_Delay(delay);
|
SDL_Delay(delay);
|
||||||
|
|||||||
Reference in New Issue
Block a user