mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-27 00:29:40 +00:00
Force DSP_RESET on AudioExit() so that we don't get "clicks" (?).
This commit is contained in:
parent
5ce5736c89
commit
866919579f
@ -323,11 +323,6 @@ static void close_audio(void)
|
||||
|
||||
// Close dsp or ESD socket
|
||||
if (audio_fd >= 0) {
|
||||
if (is_dsp_audio) {
|
||||
// Stop the device immediately. Otherwise, close() sends
|
||||
// SNDCTL_DSP_SYNC, which may hang
|
||||
ioctl(audio_fd, SNDCTL_DSP_RESET, 0);
|
||||
}
|
||||
close(audio_fd);
|
||||
audio_fd = -1;
|
||||
}
|
||||
@ -337,6 +332,11 @@ static void close_audio(void)
|
||||
|
||||
void AudioExit(void)
|
||||
{
|
||||
// Stop the device immediately. Otherwise, close() sends
|
||||
// SNDCTL_DSP_SYNC, which may hang
|
||||
if (is_dsp_audio)
|
||||
ioctl(audio_fd, SNDCTL_DSP_RESET, 0);
|
||||
|
||||
// Close audio device
|
||||
close_audio();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user