mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 00:32:45 +03:00
feat(sound): add SESound::MuteChannelGroup
This commit is contained in:
parent
73001e7e45
commit
dafab62718
@ -577,6 +577,21 @@ void SESound::Log_Write(int32_t line, const char* file, FMOD_RESULT result, cons
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SESound::MuteChannelGroup(const char* name, bool mute) {
|
||||||
|
if (!SESound::s_Initialized || !name) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto channelGroup = SESound::GetChannelGroup(name, false, false);
|
||||||
|
|
||||||
|
if (!channelGroup) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
channelGroup->m_dirty = true;
|
||||||
|
channelGroup->m_muteVolume = mute ? 0.0f : 1.0f;
|
||||||
|
}
|
||||||
|
|
||||||
void SESound::ProcessReadyDiskSounds() {
|
void SESound::ProcessReadyDiskSounds() {
|
||||||
while (auto diskSound = SESound::s_ReadyDiskSounds.Head()) {
|
while (auto diskSound = SESound::s_ReadyDiskSounds.Head()) {
|
||||||
SESound::s_ReadyDiskSounds.UnlinkNode(diskSound);
|
SESound::s_ReadyDiskSounds.UnlinkNode(diskSound);
|
||||||
|
|||||||
@ -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 MuteChannelGroup(const char* name, bool mute);
|
||||||
static void SetChannelGroupVolume(const char* name, float volume);
|
static void SetChannelGroupVolume(const char* name, float volume);
|
||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user