From 2bf61d807885e2e57e42a711cf3e2549c10301b5 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Fri, 16 Apr 2021 16:33:25 +0200 Subject: sound: Don't go down to the osd on redundant mute calls (like vgmplay's 44100 times per second) --- src/emu/sound.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 7ee663aba69..9e970b8fd52 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -1224,11 +1224,14 @@ void sound_manager::samples(s16 *buffer) void sound_manager::mute(bool mute, u8 reason) { + bool old_muted = m_muted; if (mute) m_muted |= reason; else m_muted &= ~reason; - set_attenuation(m_attenuation); + + if(old_muted != (m_muted != 0)) + set_attenuation(m_attenuation); } -- cgit v1.2.3