mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(sound): add SESound::GetChannelGroupVolume
This commit is contained in:
parent
10c17fefe7
commit
87a8f7cdc5
@ -225,6 +225,24 @@ SEChannelGroup* SESound::GetChannelGroup(const char* name, bool create, bool cre
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
float SESound::GetChannelGroupVolume(const char* name) {
|
||||
if (!SESound::s_Initialized) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
if (!name) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
auto channelGroup = SESound::GetChannelGroup(name, false, false);
|
||||
|
||||
if (!channelGroup) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return channelGroup->m_volume * channelGroup->m_muteVolume;
|
||||
}
|
||||
|
||||
int32_t SESound::Heartbeat(const void* data, void* param) {
|
||||
if (!SESound::s_Initialized) {
|
||||
SESound::s_pGameSystem->update();
|
||||
|
||||
@ -32,6 +32,7 @@ class SESound {
|
||||
// Public static functions
|
||||
static FMOD::SoundGroup* CreateSoundGroup(const char* name, int32_t maxAudible);
|
||||
static SEChannelGroup* GetChannelGroup(const char* name, bool create, bool createInMaster);
|
||||
static float GetChannelGroupVolume(const char* name);
|
||||
static int32_t Heartbeat(const void* data, void* param);
|
||||
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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user