FSoundClasses
FSoundClasses — the sound-class tree, the sound mixes that adjust it, and the concurrency groups. Classes and groups come from the project config (audio.sound_classes = "Name:Parent:Volume:Pitch:LowPass", audio.concurrency = "Name:MaxCount:Rule") or from code; a source names one of each (AudioSource::SetSoundClass / SetConcurrencyGroup, or the AudioSourceComponent fields). AudioEngine::UpdateVoices folds the class into the source's modulation every tick; AudioSource::Play asks AudioEngine::AdmitVoice before it starts. Main thread only.
- Module
- Audio
- Header
#include "Audio/SoundClass.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
void | DefineClass | |
bool | RemoveClass | |
bool | HasClass | |
bool | SetClassVolume | |
bool | SetClassPitch | |
void | Resolve | Effective volume, pitch and cutoff for a class: its own values times every ancestor's and every active mix adjustment on the chain. |
void | PushMix | Sound mixes: named sets of class adjustments, active until popped. |
bool | PopMix | |
bool | IsMixActive | |
void | DefineConcurrency | |
bool | FindConcurrency | |
bool | ParseClassEntry | |
bool | ParseConcurrencyEntry | |
EConcurrencyRule | ParseRule | |
const char* | RuleName | |
void | LoadFromConfig | |
void | Reset | |
std::vector<std::string> | GetClassNames | |
std::vector<std::string> | GetConcurrencyNames |
Function details
DefineClass
static void DefineClass(const FSoundClassDesc& desc)RemoveClass
static bool RemoveClass(const std::string& name)HasClass
static bool HasClass(const std::string& name)SetClassVolume
static bool SetClassVolume(const std::string& name, float volume)SetClassPitch
static bool SetClassPitch(const std::string& name, float pitch)Resolve
static void Resolve(const std::string& name, float& outVolume, float& outPitch, float& outLowPassHz)Effective volume, pitch and cutoff for a class: its own values times every ancestor's and every active mix adjustment on the chain. An unknown class resolves to unity. A cycle stops at 16 levels.
PushMix
static void PushMix(const std::string& mixName, const std::vector<FSoundClassAdjuster>& adjusters)Sound mixes: named sets of class adjustments, active until popped. Pushing a mix that is already active replaces its adjustments.
PopMix
static bool PopMix(const std::string& mixName)IsMixActive
static bool IsMixActive(const std::string& mixName)DefineConcurrency
static void DefineConcurrency(const FSoundConcurrencyDesc& desc)FindConcurrency
static bool FindConcurrency(const std::string& name, FSoundConcurrencyDesc& out)ParseClassEntry
static bool ParseClassEntry(const std::string& entry, FSoundClassDesc& out)ParseConcurrencyEntry
static bool ParseConcurrencyEntry(const std::string& entry, FSoundConcurrencyDesc& out)ParseRule
static EConcurrencyRule ParseRule(const std::string& name)RuleName
static const char* RuleName(EConcurrencyRule rule)LoadFromConfig
static void LoadFromConfig()Reset
static void Reset()GetClassNames
static std::vector<std::string> GetClassNames()GetConcurrencyNames
static std::vector<std::string> GetConcurrencyNames()