changeset 248:8e47ebb7bced

Reset the device before closing it - fixes a hang with some audio drivers
author Sam Lantinga <slouken@libsdl.org>
date Thu, 06 Dec 2001 01:20:22 +0000
parents b0f09f86378d
children e3d0d44f6f2e
files src/audio/dsp/SDL_dspaudio.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audio/dsp/SDL_dspaudio.c	Wed Dec 05 23:49:09 2001 +0000
+++ b/src/audio/dsp/SDL_dspaudio.c	Thu Dec 06 01:20:22 2001 +0000
@@ -233,6 +233,8 @@
 		mixbuf = NULL;
 	}
 	if ( audio_fd >= 0 ) {
+		int value;
+		ioctl(audio_fd, SNDCTL_DSP_RESET, &value);
 		close(audio_fd);
 		audio_fd = -1;
 	}