FAudioParameters
FAudioParameters — the RTPC layer: named, game-set values ("Attention", "Heat", "ScanRange") that sounds read instead of being driven one by one. A value set here glides to its target over the parameter's smoothing time, so a jumpy gameplay value does not zipper the mix. Sources bind through AudioSource::AddParameterBinding (or the AudioSourceComponent modulation fields), submixes through BindSubmix, MetaSound control inputs through MetaSoundComponent::parameterLinks; AudioEngine::UpdateVoices advances the glide and applies every binding once a tick.
- Module
- Audio
- Header
#include "Audio/AudioParameters.h"- Namespace
Mowo
Main thread only, like the rest of the mixer's control surface.
Public functions
| Returns | Name | Description |
|---|---|---|
void | Set | |
void | SetImmediate | |
float | Get | The current (glided) value; fallback when the parameter was never set. |
float | GetTarget | |
bool | Has | |
void | SetSmoothing | Seconds for the value to cover ~63% of a step; 0 = immediate. |
void | SetDefaultSmoothing | |
void | Tick | |
void | Reset | |
uint64_t | GetGeneration | Bumps whenever any current value moves, so a consumer can skip work on a tick nothing changed. |
std::vector<std::string> | GetNames | |
float | Evaluate | The binding's target value for the parameter's current value; fallback when the parameter is unset or the curve is empty. |
int32_t | BindSubmix | Submix modulation: volume and pitch multiply the submix's own fader and pitch (AudioSubmix::SetModulation) without fighting mix snapshots or the player's sliders for the fader itself. |
void | UnbindSubmix | |
void | ApplySubmixBindings |
Function details
Set
static void Set(const std::string& name, float value)SetImmediate
static void SetImmediate(const std::string& name, float value)Get
static float Get(const std::string& name, float fallback = 0.0f)The current (glided) value; fallback when the parameter was never set.
GetTarget
static float GetTarget(const std::string& name, float fallback = 0.0f)Has
static bool Has(const std::string& name)SetSmoothing
static void SetSmoothing(const std::string& name, float seconds)Seconds for the value to cover ~63% of a step; 0 = immediate.
SetDefaultSmoothing
static void SetDefaultSmoothing(float seconds)Tick
static void Tick(float deltaTime)Reset
static void Reset()GetGeneration
static uint64_t GetGeneration()Bumps whenever any current value moves, so a consumer can skip work on a tick nothing changed.
GetNames
static std::vector<std::string> GetNames()Evaluate
static float Evaluate(const FAudioParameterBinding& binding, float fallback)The binding's target value for the parameter's current value; fallback when the parameter is unset or the curve is empty.
BindSubmix
static int32_t BindSubmix(const std::string& submix, const FAudioParameterBinding& binding)Submix modulation: volume and pitch multiply the submix's own fader and pitch (AudioSubmix::SetModulation) without fighting mix snapshots or the player's sliders for the fader itself. Returns a handle for Unbind.
UnbindSubmix
static void UnbindSubmix(int32_t handle)ApplySubmixBindings
static void ApplySubmixBindings()