feat(sound): add SESound::SetMasterVolume

This commit is contained in:
fallenoak committed 2025-11-29 19:36:04 -06:00
1 parent 7838a0fe85
commit 1c7165d73e
2 files changed
+15

No files matched your search

+14
View File
@@ -715,6 +715,20 @@ void SESound::SetChannelGroupVolume(const char* name, float volume) {
channelGroup->m_dirty = true;
}
void SESound::SetMasterVolume(float volume) {
if (!SESound::s_Initialized) {
return;
}
if (volume < 0.0f || volume > 1.0f) {
return;
}
auto masterChannelGroup = &SESound::s_ChannelGroups[0];
masterChannelGroup->m_volume = volume;
masterChannelGroup->m_dirty = true;
}
void SESound::CompleteLoad() {
if (!this->m_internal) {
return;
+1
View File
@@ -39,6 +39,7 @@ class SESound {
static void Log_Write(int32_t line, const char* file, FMOD_RESULT result, const char* fmt, ...);
static void MuteChannelGroup(const char* name, bool mute);
static void SetChannelGroupVolume(const char* name, float volume);
static void SetMasterVolume(float volume);
// Public member functions
void CompleteLoad();