AbstractAudioSystem

AbstractAudioSystem

Abstract Base class for speech and sound system

Constructor

new AbstractAudioSystem()

Members

reverbAudioBuffer :AudioBuffer

The audioBuffer in convolver node for reverb effect

Methods

_getAudio(entity)

Override in sound/speech system to get corresponding audio objects sound/speech

Parameters:
Name Type Description
entity Entity

_getAudioComponent(entity)

Override in sound/speech system to get corresponding component

Parameters:
Name Type Description
entity Entity

_initializeAudioNodes()

Initialize all the audio nodes needed for graph

deleted(entity)

Be sure to stop all playing audio when a component is removed. Called by world.process()

Parameters:
Name Type Description
entity Entity

inserted(entity)

Connect audio components output nodes to audio system buses. Called by world.process()

Parameters:
Name Type Description
entity Entity

mute()

Mute all audio.

setReverb(audioBufferopt)

Set the reverb impulse response. The settings are not applied immediately.

Parameters:
Name Type Attributes Description
audioBuffer AudioBuffer <optional>

if empty will also empty existing reverb

unmute()

Unmute all audio.

updateDirtyFields()

Update nodes if dirty