mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-20 15:31:22 +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
|
// Close dsp or ESD socket
|
||||||
if (audio_fd >= 0) {
|
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);
|
close(audio_fd);
|
||||||
audio_fd = -1;
|
audio_fd = -1;
|
||||||
}
|
}
|
||||||
@ -337,6 +332,11 @@ static void close_audio(void)
|
|||||||
|
|
||||||
void AudioExit(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 device
|
||||||
close_audio();
|
close_audio();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user