Skip to main content

Interface: AudioVoiceRequest

Defined in: webxr-environment/src/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.webxr-environment/src/audio.ts:177
cuereadonlyAudioCue-webxr-environment/src/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.webxr-environment/src/audio.ts:192
facingreadonlyVec3 | nullWhich way this voice faces, or null. See PlayOptions.facing.webxr-environment/src/audio.ts:184
gainreadonlynumberAbsolute gain, master x bus x cue x play, clamped at 0.webxr-environment/src/audio.ts:174
loopreadonlyboolean-webxr-environment/src/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.webxr-environment/src/audio.ts:182
voiceIdreadonlynumber-webxr-environment/src/audio.ts:171