From 97e2951875fbc306e03f115a6f73992ffa167593 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 2 Nov 2025 18:30:12 -0800 Subject: [PATCH] Removed redundant wait at shutdown in the ALSA audio driver --- src/audio/alsa/SDL_alsa_audio.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index e292b3673f..01a89a9ec2 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -484,12 +484,6 @@ static void ALSA_CloseDevice(SDL_AudioDevice *device) { if (device->hidden) { if (device->hidden->pcm) { - // Wait for the submitted audio to drain. ALSA_snd_pcm_drop() can hang, so don't use that. - int delay = ((device->sample_frames * 1000) / device->spec.freq) * 2; - if (delay > 100) { - delay = 100; - } - SDL_Delay(delay); ALSA_snd_pcm_close(device->hidden->pcm); } SDL_free(device->hidden->mixbuf);