Audio

Available in: Interface Scripts Client Entity Scripts Server Entity Scripts Assignment Client Scripts

The Audio API features tools to help control audio contexts and settings.
Methods

Signals
nop

Properties:
Name Type Description
muted boolean
noiseReduction boolean
inputVolume number
inputLevel number Read-only.
context string Read-only.
devices Read-only.

Methods

getRecording() → {boolean}
Returns:
Type: boolean
isStereoInput() → {boolean}
Returns:
Type: boolean
playSound(sound, injectorOptionsopt) → {object}
Parameters:
Name Type Attributes Default Description
sound
injectorOptions <optional>
null
Returns:
Type: object
playSystemSound(sound, position) → {object}
Parameters:
Name Type Description
sound
position
Returns:
Type: object
setInputDevice(device, isHMD)
Parameters:
Name Type Description
device
isHMD boolean
setOutputDevice(device, isHMD)
Parameters:
Name Type Description
device
isHMD boolean
setReverb(enable)
Parameters:
Name Type Description
enable boolean
setReverbOptions(options)
Parameters:
Name Type Description
options AudioEffectOptions
setStereoInput(stereo) → {boolean}
Parameters:
Name Type Description
stereo boolean
Returns:
Type: boolean
startRecording(filename) → {boolean}
Parameters:
Name Type Description
filename string
Returns:
Type: boolean
stopRecording()

Signals

contextChanged(context) → {Signal}
Parameters:
Name Type Description
context string
Returns:
Type: Signal
disconnected() → {Signal}
The client has been disconnected from the audio mixer.
Returns:
Type: Signal
environmentMuted() → {Signal}
The entire environment has been muted by the mixer.
Returns:
Type: Signal
inputLevelChanged(level) → {Signal}
Parameters:
Name Type Description
level number
Returns:
Type: Signal
inputReceived(inputSamples) → {Signal}
A frame of mic input audio has been received and processed.
Parameters:
Name Type Description
inputSamples
Returns:
Type: Signal
inputVolumeChanged(volume) → {Signal}
Parameters:
Name Type Description
volume number
Returns:
Type: Signal
mutedByMixer() → {Signal}
The client has been muted by the mixer.
Returns:
Type: Signal
mutedChanged(isMuted) → {Signal}
Parameters:
Name Type Description
isMuted boolean
Returns:
Type: Signal
noiseGateClosed() → {Signal}
The noise gate has closed.
Returns:
Type: Signal
noiseGateOpened() → {Signal}
The noise gate has opened.
Returns:
Type: Signal
noiseReductionChanged(isEnabled) → {Signal}
Parameters:
Name Type Description
isEnabled boolean
Returns:
Type: Signal
nop() → {Signal}
Returns:
Type: Signal
onContextChanged() → {Signal}
Returns:
Type: Signal
receivedFirstPacket() → {Signal}
The client has received its first packet from the audio mixer.
Returns:
Type: Signal