API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceVoice
A live playback instance in the audio graph with a control surface. A Voice is created by playing a Playable via AudioSystem.play (and, later, by opening an `AudioInput`). Each `play()` returns an independent Voice, so overlapping concurrent playback of the same asset is just multiple Voices. Concrete voices mix in the capability interfaces (Seekable, Pausable, Loopable, RatePitched) for whatever their backing Web Audio node actually supports - narrow with a capability check (`'seek' in voice`) before using one. Spatializable is not one of those: every voice carries it. The panner is inserted lazily, so a voice that is never positioned costs nothing, and PlayOptions already accepts the full spatial set at play time - a returned voice must be able to keep steering what the play call was allowed to start.
import { Voice } from '@codexo/exojs'A live playback instance in the audio graph with a control surface.
A Voice is created by playing a Playable via AudioSystem.play (and, later, by opening an `AudioInput`). Each `play()` returns an independent Voice, so overlapping concurrent playback of the same asset is just multiple Voices.
Concrete voices mix in the capability interfaces (Seekable, Pausable, Loopable, RatePitched) for whatever their backing Web Audio node actually supports - narrow with a capability check (`'seek' in voice`) before using one.
Spatializable is not one of those: every voice carries it. The panner is inserted lazily, so a voice that is never positioned costs nothing, and PlayOptions already accepts the full spatial set at play time - a returned voice must be able to keep steering what the play call was allowed to start.
addSend(bus: AudioBusHierarchical mixer node in the engine's audio routing graph. Each bus owns three Web Audio nodes (input gain, optional effect chain, stereo pan, output gain) a…, level?: number): AudioSendA parallel tap from one voice's output into an AudioBus, at its own level. A send is what an insert effect cannot express: the voice keeps playing into its own…coneInnerAngle: numberconeOuterAngle: numberconeOuterGain: numberelevation: numberelevationVelocity: numberended: booleanmaxDistance: numberocclusion: numberorientation: numberoutput: AudioNodepanningModel: PanningModelType | nullrefDistance: numberrolloffFactor: numbervolume: number