Skip to main content

Interface: AudioVoiceRequest

Defined in: audio.ts:170

A play request with every decision already made: which file, how loud in absolute terms, looping or not, and where from. An adapter implementing AudioPort has no mixing left to do.

Properties

PropertyModifierTypeDescriptionDefined in
atreadonlyVec3 | nullWorld position, or null for playback from the listener.audio.ts:177
cuereadonlyAudioCue-audio.ts:172
endedreadonly() => voidThe port calls this ONCE when the voice stops of its own accord, so the director can retire it. A port that fires and forgets a one-shot should call it immediately; the voice is then untracked, and restart / ignore degrade to overlap for that cue. A port that cannot report the end of a LOOPING voice is broken - loops are always stoppable.audio.ts:192
facingreadonlyVec3 | nullWhich way this voice faces, or null. See PlayOptions.facing.audio.ts:184
gainreadonlynumberAbsolute gain, master x bus x cue x play, clamped at 0.audio.ts:174
loopreadonlyboolean-audio.ts:175
spatialreadonlyAudioSpatial | nullThe cue's attenuation, or null when it named none and the port should use its own defaults. Resolved here so a port never reads the cue for policy.audio.ts:182
voiceIdreadonlynumber-audio.ts:171