diff --git a/Runtime/Audio/CAudioSys.cpp b/Runtime/Audio/CAudioSys.cpp index a347209f9..028d17a78 100644 --- a/Runtime/Audio/CAudioSys.cpp +++ b/Runtime/Audio/CAudioSys.cpp @@ -3,11 +3,19 @@ #include "CAudioGroupSet.hpp" namespace urde { +namespace { +std::unordered_map> mpGroupSetDB; +std::unordered_map mpGroupSetResNameDB; +const std::string mpDefaultInvalidString = "NULL"; + +float s_MasterVol = 1.f; +float s_SfxVol = 1.f; + +s16 s_VolumeScale = 0x7f; +s16 s_DefaultVolumeScale = 0x7f; +} // Anonymous namespace CAudioSys* CAudioSys::g_SharedSys = nullptr; -static std::unordered_map> mpGroupSetDB; -static std::unordered_map mpGroupSetResNameDB; -static const std::string mpDefaultInvalidString = "NULL"; TLockedToken CAudioSys::FindGroupSet(std::string_view name) { auto search = mpGroupSetDB.find(name.data()); @@ -65,8 +73,6 @@ void CAudioSys::SysRemoveGroupFromAmuse(std::string_view name) { RemoveAudioGroup(set->GetAudioGroupData()); } -static float s_MasterVol = 1.f; -static float s_SfxVol = 1.f; void CAudioSys::_UpdateVolume() { GetAmuseEngine().setVolume(s_MasterVol * s_SfxVol); } void CAudioSys::SysSetVolume(u8 volume) { @@ -79,9 +85,6 @@ void CAudioSys::SysSetSfxVolume(u8 volume, u16 time, bool music, bool fx) { _UpdateVolume(); } -static s16 s_VolumeScale = 0x7f; -static s16 s_DefaultVolumeScale = 0x7f; - s16 CAudioSys::GetDefaultVolumeScale() { return s_DefaultVolumeScale; } void CAudioSys::SetDefaultVolumeScale(s16 scale) { s_DefaultVolumeScale = scale; }