Commit b3136f3c authored by Sam Lantinga's avatar Sam Lantinga

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
parent 0d4c3555
...@@ -233,6 +233,8 @@ static void DSP_CloseAudio(_THIS) ...@@ -233,6 +233,8 @@ static void DSP_CloseAudio(_THIS)
mixbuf = NULL; mixbuf = NULL;
} }
if ( audio_fd >= 0 ) { if ( audio_fd >= 0 ) {
int value;
ioctl(audio_fd, SNDCTL_DSP_RESET, &value);
close(audio_fd); close(audio_fd);
audio_fd = -1; audio_fd = -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment