mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(sound): add SESound::SetChannelGroupVolume
This commit is contained in:
parent
87a8f7cdc5
commit
d5cebf9a02
@ -590,6 +590,24 @@ void SESound::ProcessReadyDiskSounds() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SESound::SetChannelGroupVolume(const char* name, float volume) {
|
||||||
|
if (!SESound::s_Initialized) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (volume < 0.0f || volume > 1.0f) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!name) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto channelGroup = SESound::GetChannelGroup(name, true, true);
|
||||||
|
channelGroup->m_volume = volume;
|
||||||
|
channelGroup->m_dirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
void SESound::CompleteLoad() {
|
void SESound::CompleteLoad() {
|
||||||
if (!this->m_internal) {
|
if (!this->m_internal) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -37,6 +37,7 @@ class SESound {
|
|||||||
static void Init(int32_t maxChannels, int32_t (*a2), int32_t enableReverb, int32_t enableSoftwareHRTF, int32_t* numChannels, int32_t* outputDriverIndex, const char* outputDriverName, void (*a8), int32_t a9);
|
static void Init(int32_t maxChannels, int32_t (*a2), int32_t enableReverb, int32_t enableSoftwareHRTF, int32_t* numChannels, int32_t* outputDriverIndex, const char* outputDriverName, void (*a8), int32_t a9);
|
||||||
static int32_t IsInitialized();
|
static int32_t IsInitialized();
|
||||||
static void Log_Write(int32_t line, const char* file, FMOD_RESULT result, const char* fmt, ...);
|
static void Log_Write(int32_t line, const char* file, FMOD_RESULT result, const char* fmt, ...);
|
||||||
|
static void SetChannelGroupVolume(const char* name, float volume);
|
||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
void CompleteLoad();
|
void CompleteLoad();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user