atmoky Engage Server SDK is now available! Check out the documentation to learn more.
API Reference
Classes
AudioBed

AudioBed

Summary
Interface for audio bed signals.
⚠️
Do not construct an AudioBed yourself, it will be created by the renderer.

Methods

getGainDecibels

Returns the currently set gain in decibels.
Signature
getGainDecibels()
Returns
number The current gain in decibels.

getGainLinear

Returns the currently set gain as a linear value.
Signature
getGainLinear()
Returns
number The current linear gain.

getHeadlocked

Returns the current headlocked-mode.
Signature
getHeadlocked()
Returns
boolean true if headlocked-mode is activated.

removeInput

Disconnects an audionode from the audio bed input.
Signature
removeInput(node: AudioNode, outputIndex?: number)
NameTypeDescription
nodeAudioNodenode to disconnect
outputIndex optionalnumberindex of the node's output bus which should be disconnected
Returns
void
⚠️
Make sure this AudioNode has been previously connected to the AudioBed.

setGainDecibels

Sets the gain in decibels.
Signature
setGainDecibels(dB: number)
NameTypeDescription
dBnumberThe gain in decibels to apply.
Returns
void

setGainLinear

Sets gain from a linear value.
Signature
setGainLinear(gain: number)
NameTypeDescription
gainnumberThe linear gain to apply.
Returns
void

setHeadlocked

Sets the audio bed headlocked, making its rendering unaffected by the listener's orientation.
Signature
setHeadlocked(shouldBeHeadlocked: boolean)
NameTypeDescription
shouldBeHeadlockedbooleanset true to enable headlocked-mode
Returns
void

setInput

Connects an audionode to the audio bed input.
Signature
setInput(node: AudioNode, outputIndex?: number)
NameTypeDescription
nodeAudioNodeaudio node to be connected
outputIndex optionalnumberindex of the node's output bus which should be connected
Returns
void
💡
You can connect multiple audio nodes by calling connect several times.

atmoky Logo

© 2024 atmoky, GmbH.
All rights reserved.

We use cookies to measure and improve your browsing experience, and serve personalized ads or content.