struct
AudioSourceComponent
- Module
- Audio
- Header
#include "Audio/Components/AudioSourceComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
std::string | clipPath | Configuration (set by user) |
std::string | cuePath | A .cuegraph sound cue authored in the editor. When set it takes over from clipPath entirely: each trigger picks a clip by weight and rolls fresh volume and pitch inside the cue's ranges, so a footstep or an impact varies instead of repeating one sample. Bus, looping, spatialization and distance come from the cue, not from the fields below. Cue playback is one-shot per trigger — an instance is positioned where the entity stood when it fired and does not follow it afterwards. |
std::string | soundCuePath | A .soundcue node-graph asset (Random / Mixer / Modulator / Attenuation / Looping). Resolved through the asset manager and compiled to a runtime cue, so a Mixer graph layers all its branches into one instance. Takes priority over both cuePath and clipPath when set; otherwise the same one-shot-per-trigger playback as cuePath applies. |
std::string | bus | A submix name: one of the defaults ("Master", "Music", "SFX", "Voice", "Ambient") or any submix the project declares. Default "SFX". |
std::string | soundClass | A sound class from audio.sound_classes (volume/pitch/low-pass that sound mixes adjust) and a concurrency group from audio.concurrency (how many may play at once, and what gives way). Empty = neither. |
std::string | concurrencyGroup | |
float | volume | Default 1.0f. |
float | pitch | Default 1.0f. |
bool | loop | Default false. |
bool | spatial | Default true. |
float | minDistance | Default AudioDefaults::DefaultMinDistance. |
float | maxDistance | Default AudioDefaults::DefaultMaxDistance. |
EAudioAttenuationModel | attenuationModel | Default EAudioAttenuationModel::Inverse. |
float | rolloff | Default 1.0f. |
std::vector<FAudioCurveKey> | gainCurve | Author-editable attenuation curves. When gainCurve has any key it takes over distance attenuation entirely — the built-in falloff model is switched off for this voice and the gain is read straight off the curve (value = 0..1 volume multiplier) sampled by listener distance. Empty means the built-in model runs exactly as before, so nothing regresses. |
std::vector<FAudioCurveKey> | lpfCurve | Cutoff-over-distance for a distance low-pass: value = cutoff Hz at that distance. Any key enables it; the voice's cutoff becomes the lower of this curve and the occlusion cutoff so a distant AND occluded source is filtered by whichever is darker. Empty leaves the voice full-band. |
EAudioCurveInterp | curveInterp | Default EAudioCurveInterp::Linear. |
std::string | attenuationPath | A shared .attenuation asset (shape, per-property curves, cone, focus, air absorption). When set it is the voice's whole distance law and the curves above are ignored, the way a UE source with an Attenuation Settings asset ignores its overrides unless told otherwise. |
std::string | modulationParameter | Parameter modulation (FAudioParameters): a named game value ("Heat", "Attention", "ScanRange") read through these curves onto the voice. In these curves a key's Distance is the PARAMETER value, not metres. Volume and pitch multiply the authored values; the cutoff sits under occlusion. Step interpolation makes bands: the voice jumps as the value crosses a key instead of gliding between them. Applied when the source is created. |
std::vector<FAudioCurveKey> | modulationVolumeCurve | |
std::vector<FAudioCurveKey> | modulationPitchCurve | |
std::vector<FAudioCurveKey> | modulationLpfCurve | |
EAudioCurveInterp | modulationInterp | Default EAudioCurveInterp::Linear. |
std::vector<FAudioSourceEffectDesc> | effectChain | Ordered per-source effects between the occlusion low-pass and the bus, built when the source is created. |
float | dopplerScale | Default 1.0f. |
float | coneInnerAngle | Default 360.0f. |
float | coneOuterAngle | Default 360.0f. |
float | coneOuterGain | Default 0.0f. |
bool | playOnCreate | Default false. |
bool | streaming | Decode from disk as the clip plays instead of loading it whole. Long clips (music, ambience beds) want this; short one-shots do not, because streaming costs a seek on every Play(). Default false. |
float | priority | Voice budget rank. Higher wins when more sources play than audio.max_voices allows; effective volume (base volume × distance attenuation) breaks ties. Losers virtualize — they keep tracking their playback position but stop costing mixer time. Default 50.0f. |
float | significanceScale | Default 1.0f. |
bool | useOcclusion | Occlusion — when enabled, AudioSystem asks FSoundOcclusion what stands between this source and the listener each frame. How much a wall takes is the wall's material (the project's occlusion table), never a knob here: a per-source cutoff is how voices and world sounds came to disagree about the same door. Smoothing controls the glide — 5/s feels natural, faster sounds like the listener teleporting through walls. Default false. |
float | occlusionSmoothing | Default 5.0f. |
uint32_t | occlusionLayerMask | Player (layer 2) is cleared, matching CameraControllerComponent. The trace ends AT the listener, which sits inside the listening character's capsule — and since characters carry a real body in the collision world, an all-layers mask made every source in the level read as occluded by the listener's own capsule wall. Default 0xFFFFFFFBu. |
AudioSource* | source | Runtime state (managed by AudioSystem) Default nullptr. |
SoundCue* | cue | Default nullptr. |
bool | cueResolveAttempted | Default false. |
bool | initialized | Default false. |
bool | playRequested | Default false. |
bool | stopRequested | Default false. |
float | currentOcclusionCutoff | Default 20000.0f. |
float | currentOcclusionGain | Default 1.0f. |
Vec3 | prevPosition | |
bool | hasPrevPosition | Default false. |
Generated from Audio/Components/AudioSourceComponent.h via audio.json · Oct 26, 2026Version 1.0.0