Skip to content

Commit 4ae517e

Browse files
committed
Removed redundant wait at shutdown in the ALSA audio driver
(cherry picked from commit 97e2951)
1 parent 1fd4703 commit 4ae517e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/audio/alsa/SDL_alsa_audio.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,6 @@ static void ALSA_CloseDevice(SDL_AudioDevice *device)
461461
{
462462
if (device->hidden) {
463463
if (device->hidden->pcm) {
464-
// Wait for the submitted audio to drain. ALSA_snd_pcm_drop() can hang, so don't use that.
465-
int delay = ((device->sample_frames * 1000) / device->spec.freq) * 2;
466-
if (delay > 100) {
467-
delay = 100;
468-
}
469-
SDL_Delay(delay);
470464
ALSA_snd_pcm_close(device->hidden->pcm);
471465
}
472466
SDL_free(device->hidden->mixbuf);

0 commit comments

Comments
 (0)