mirror of
https://github.com/yawut/SDL.git
synced 2026-06-13 20:20:38 -05:00
Reset the device before closing it - fixes a hang with some audio drivers
This commit is contained in:
parent
e3a9b8d5a8
commit
ffd31e2ecf
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user