protected _getAudio
Gets an audio asset from the audio hash map.
User friendly reference
If true, does NOT search for an available channel
protected abstract _getAudioDuration
The logic to get the total duration of an audio asset.
Must be implemented by subclasses.
protected _getData
Gets the asset's data.
protected abstract _getTimeCursor
The logic to get the current time playing of an audio asset,
in seconds.
Must be implemented by subclasses.
protected abstract _getVolume
The logic to get the volume of an audio asset.
protected abstract _isAudioLooping
The logic to check for audio looping.
Return true, if audio is looping.
Must be implemented by subclasses.
protected abstract _isAudioMuted
The logic to check for muted audio.
Returns true if audio is muted.
Must be implemented by subclasses.
protected abstract _loopAudio
The logic to enable audio looping.
Must be implemented by subclasses.
protected abstract _muteAudio
The logic to mute audio.
Must be implemented by subclasses.
protected abstract _pauseAudio
The logic to pause audio. Must be implemented by subclasses.
protected abstract _playAudio
The logic to play audio. Must be implemented by subclasses.
protected _setAudio
Adds an audio asset to the audio hash map.
If audio is null, then the key is deleted.
User friendly reference
protected abstract _setTimeCursor
The logic to set the current time played of an audio asset.
Must be implemented by subclasses.
protected abstract _setVolume
The logic to set the volume of an audio asset.
Must be implemented by subclasses.
protected abstract _stopAudio
The logic to stop audio. Must be implemented by subclasses.
protected _warnMissingAudio
Reports an audio missing warning.
User friendly reference.
public addAudio
Adds an audio asset to this audio engine.
User Friendly name
Optional
public getAudioDuration
Gets the duration of the audio asset (in seconds).
User friendly name
public getTimeCursor
Gets the current time being played on the audio asset,
in seconds.
User friendly name
public getVolume
Gets the volume of the audio asset.
User friendly name
public hasAudio
Returns true, if an audio asset by name exists.
User friendly name.
public isAudioLooping
Returns true, if audio asset will loop.
User friendly name
public isAudioMuted
Returns true if the audio asset is muted.
User friendly name
public loopAudio
Enables looping of an audio asset.
User friendly name
Should the audio asset loop?
public muteAudio
Mutes an audio asset.
public pauseAudio
Pauses an audio asset.
User friendly name
public playAudio
Plays an audio asset.
User friendly name
public releaseAssets
Removes all audio assets from the audio engine.
public removeAudio
Removes an audio asset from this audio engine.
Will stop the audio if playing.
User friendly name
public setTimeCursor
Sets the current time to be played on the audio asset,
in seconds.
User friendly name
public setVolume
Sets the volume of the audio asset.
User friendly name
public stopAudio
Stops an audio asset. (Resets time cursor back to 0 seconds).
User friendly name
Generated using TypeDoc
public constructor AudioEngine
Creates an AudioEngine to manage and play different audio assets. This class is abstract and must be subclassed, with an implementation to the abstract methods.TODO: Make a way to mute/unmute All Audio