sound: Don't go down to the osd on redundant mute calls (like vgmplay's 44100 times per second)

This commit is contained in:
Olivier Galibert 2021-04-16 16:33:25 +02:00
parent 9c8b72a5fe
commit 2bf61d8078

View File

@ -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);
}