Audio Nodes
Three Steam Audio exposes four AudioWorklet-based nodes.
SteamAudioNode
Section titled “SteamAudioNode”Created by world.createNode(source). It renders a single source with direct effects, HRTF spatialization, and optional reflections/reverb sends.
Properties
Section titled “Properties”source
: The Source associated with this node.
ready
: Promise<void> resolved when the AudioWorklet processor has initialized.
state
: 'initializing' | 'ready' | 'failed' | 'disposed'.
error
: Error | undefined set if initialization fails.
Methods
Section titled “Methods”connectReflections(bus, options?)
Section titled “connectReflections(bus, options?)”node.connectReflections( bus: ReflectionBusNode, options?: { gain?: number },): ReflectionConnectionConnects the source’s reflection send to a reflection bus. Returns a connection with disconnect() and setGain(gain).
connectReverb(bus, options?)
Section titled “connectReverb(bus, options?)”node.connectReverb( bus: ReverbBusNode, options?: { gain?: number },): ReverbConnectionConnects the source’s reverb send to a reverb bus.
dispose()
Section titled “dispose()”node.dispose(): voidDisconnects and disposes the node.
SteamAudioAmbisonicNode
Section titled “SteamAudioAmbisonicNode”Created by world.createAmbisonicNode(source). It decodes a four-channel first-order AmbiX input to stereo. See AmbisonicSource.
The node has one input and one stereo output, and exposes ready, state, error, and dispose() with the same meanings as SteamAudioNode.
ReflectionBusNode
Section titled “ReflectionBusNode”Created by world.createReflectionBus(). Renders per-source parametric reflections.
Methods
Section titled “Methods”setWet(wet)
Section titled “setWet(wet)”bus.setWet(wet: number): voidSets the bus wet level in [0, ∞).
dispose()
Section titled “dispose()”bus.dispose(): voidReverbBusNode
Section titled “ReverbBusNode”Created by world.createReverbBus(). Renders listener parametric reverb.
Methods
Section titled “Methods”setWet(wet)
Section titled “setWet(wet)”bus.setWet(wet: number): voidSets the bus wet level in [0, ∞).
dispose()
Section titled “dispose()”bus.dispose(): voidReflectionConnection / ReverbConnection
Section titled “ReflectionConnection / ReverbConnection”disconnect()
: Removes the send.
setGain(gain)
: Updates the send gain in [0, ∞).