mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-12-18 03:43:54 -05:00
Convert DirectSound logic to miniaudio (#34)
Some checks are pending
Build / Current msys2 mingw32 (push) Waiting to run
Build / Current msys2 mingw64 (push) Waiting to run
Build / Current MSVC (32-bit) (push) Waiting to run
Build / Current MSVC (64-bit) (push) Waiting to run
Format / C++ (push) Waiting to run
Naming / C++ (push) Waiting to run
Some checks are pending
Build / Current msys2 mingw32 (push) Waiting to run
Build / Current msys2 mingw64 (push) Waiting to run
Build / Current MSVC (32-bit) (push) Waiting to run
Build / Current MSVC (64-bit) (push) Waiting to run
Format / C++ (push) Waiting to run
Naming / C++ (push) Waiting to run
* Convert DirectSound logic to miniaudio * Update legocachsound.cpp
This commit is contained in:
parent
d22c4cd1f2
commit
07655651f5
1 changed files with 2 additions and 3 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue