AudioEvent
struct AudioEvent
AudioEvent is an audio event asset.
Bus field
field Bus aego/audio.Bus
Routes voices started by this event to the selected audio bus.
Cooldown field
field Cooldown float
Sets the minimum interval between accepted triggers of this event in seconds; zero disables the interval limit.
Loop field
field Loop bool
Repeats each started voice until it is stopped, including any selected clip variant.
MaxDistance field
field MaxDistance float
Sets the outer attenuation distance in world units. For spatial audio it must exceed MinDistance.
MaxVoices field
field MaxVoices int
Limits simultaneous voices of this event; zero imposes no event-specific limit. The mixer still has its own voice budget.
MinDistance field
field MinDistance float
Sets the inner distance in world units before spatial distance attenuation begins.
PanWidth field
field PanWidth float
Scales spatial stereo panning from 0 (centred) to 1 (full width); it does not change distance attenuation.
PauseWith field
field PauseWith aego/audio.PauseWith
Chooses Game to pause voices with the game, or Never to keep them playing during game pause.
Pitch field
field Pitch float
Sets base playback speed and pitch together, from 0.25 to 4; 1 preserves the clip's original speed.
PitchRand field
field PitchRand float
Sets the random pitch fraction from 0 to 1. Each trigger multiplies Pitch by a random factor between 1−PitchRand and 1+PitchRand.
Priority field
field Priority int
Sets mixer voice priority from 0 to 255; higher-priority sounds are preferred under voice pressure.
Spatial field
field Spatial bool
Enables listener-relative distance attenuation and panning instead of nonspatial playback.
Steal field
field Steal aego/audio.Steal
Chooses whether reaching MaxVoices rejects the new trigger or replaces an existing voice by age or quietness.
Volume field
field Volume float
Sets base linear gain from 0 to 2 before event randomisation and the clip and bus gains; zero is silent.
VolumeRand field
field VolumeRand float
Sets the random gain reduction fraction from 0 to 1. Each trigger uses a gain between Volume×(1−VolumeRand) and Volume.