From 16c51ee540deb7b8574ddd3b0c99be1d219e4101 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 6 Dec 2001 01:20:22 +0000 Subject: [PATCH] Reset the device before closing it - fixes a hang with some audio drivers --- src/audio/dsp/SDL_dspaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/audio/dsp/SDL_dspaudio.c b/src/audio/dsp/SDL_dspaudio.c index b6fdf82a0..eecb2c607 100644 --- a/src/audio/dsp/SDL_dspaudio.c +++ b/src/audio/dsp/SDL_dspaudio.c @@ -233,6 +233,8 @@ static void DSP_CloseAudio(_THIS) mixbuf = NULL; } if ( audio_fd >= 0 ) { + int value; + ioctl(audio_fd, SNDCTL_DSP_RESET, &value); close(audio_fd); audio_fd = -1; }