Reset the device before closing it - fixes a hang with some audio drivers

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40249
This commit is contained in:
Sam Lantinga 2001-12-06 01:20:22 +00:00
parent 0d4c3555ab
commit b3136f3c32

View file

@ -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;
}