From 07655651f55403c1002c60fcdce7ae6d9a16a2a0 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 14 Dec 2024 20:36:13 -0700 Subject: [PATCH] Convert DirectSound logic to miniaudio (#34) * Convert DirectSound logic to miniaudio * Update legocachsound.cpp --- LEGO1/lego/legoomni/src/audio/legocachsound.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/LEGO1/lego/legoomni/src/audio/legocachsound.cpp b/LEGO1/lego/legoomni/src/audio/legocachsound.cpp index 3965b82c..71bdb110 100644 --- a/LEGO1/lego/legoomni/src/audio/legocachsound.cpp +++ b/LEGO1/lego/legoomni/src/audio/legocachsound.cpp @@ -231,12 +231,11 @@ void LegoCacheSound::MuteSilence(MxBool p_muted) m_muted = p_muted; if (m_muted) { - m_dsBuffer->SetVolume(-3000); + ma_sound_set_volume(&m_cacheSound, ma_volume_db_to_linear(-3000.0f / 100.0f)); } else { MxS32 volume = m_volume * SoundManager()->GetVolume() / 100; - MxS32 attenuation = SoundManager()->GetAttenuation(volume); - m_dsBuffer->SetVolume(attenuation); + ma_sound_set_volume(&m_cacheSound, SoundManager()->GetAttenuation(volume)); } } }