diff options
| author | 2021-04-16 16:33:25 +0200 | |
|---|---|---|
| committer | 2021-04-16 16:33:25 +0200 | |
| commit | 2bf61d807885e2e57e42a711cf3e2549c10301b5 (patch) | |
| tree | b9d04fe942ad1bb2ee7d0c3cdcad11542472e01f | |
| parent | 9c8b72a5febb9c1e1a038a0105c5e35f4bc49a0d (diff) | |
sound: Don't go down to the osd on redundant mute calls (like vgmplay's 44100 times per second)
| -rw-r--r-- | src/emu/sound.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |
