From 44aa6adfb073dfc4a3e68342894eedf7a48bffec Mon Sep 17 00:00:00 2001 From: Miran Date: Fri, 20 Sep 2024 13:49:46 +0200 Subject: [PATCH] Music volume in cutscenes. --- cleo_plugins/Audio/CSoundSystem.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cleo_plugins/Audio/CSoundSystem.cpp b/cleo_plugins/Audio/CSoundSystem.cpp index 578f81b3..6c8c2bec 100644 --- a/cleo_plugins/Audio/CSoundSystem.cpp +++ b/cleo_plugins/Audio/CSoundSystem.cpp @@ -248,16 +248,16 @@ namespace CLEO float volume; switch (type) { - case SoundEffect: + case SoundEffect: volume = AEAudioHardware.m_fEffectMasterScalingFactor* AEAudioHardware.m_fEffectsFaderScalingFactor * 0.5f; // fitted to game's sfx volume break; - case Music: + case Music: volume = AEAudioHardware.m_fMusicMasterScalingFactor * AEAudioHardware.m_fMusicFaderScalingFactor * 0.5f; break; - default: - volume = 1.0f; + default: + volume = 1.0f; break; } @@ -267,7 +267,11 @@ namespace CLEO volume *= 1.0f - TheCamera.m_fFadeAlpha / 255.0f; } - // TODO: music volume lowering when in cutscenes, when mission or ped speach is active etc. + // music volume lowering in cutscenes, when characters talk, mission sounds are played etc. + if (type == Music) + { + if (TheCamera.m_bWideScreenOn) volume /= 3.0f; + } return volume; }