Skip to content

Commit

Permalink
Music volume in cutscenes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC committed Sep 21, 2024
1 parent d98a964 commit 44aa6ad
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cleo_plugins/Audio/CSoundSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}
Expand Down

0 comments on commit 44aa6ad

Please sign in to comment.