Skip to content

Commit 97e2951

Browse files
committed
Removed redundant wait at shutdown in the ALSA audio driver
1 parent 4db63e3 commit 97e2951

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
@@ -484,12 +484,6 @@ static void ALSA_CloseDevice(SDL_AudioDevice *device)
484484
{
485485
if (device->hidden) {
486486
if (device->hidden->pcm) {
487-
// Wait for the submitted audio to drain. ALSA_snd_pcm_drop() can hang, so don't use that.
488-
int delay = ((device->sample_frames * 1000) / device->spec.freq) * 2;
489-
if (delay > 100) {
490-
delay = 100;
491-
}
492-
SDL_Delay(delay);
493487
ALSA_snd_pcm_close(device->hidden->pcm);
494488
}
495489
SDL_free(device->hidden->mixbuf);

0 commit comments

Comments
 (0)