mirror of
https://github.com/yawut/SDL.git
synced 2026-09-25 09:55:41 -05:00
Reset the device before closing it - fixes a hang with some audio drivers
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user