Class: AudioClips

gEngine.AudioClips()

new AudioClips()

Default Constructor

Provides support for loading and unloading of Audio clips.

Source:

Methods

incBackgroundVolume(increment) → {void}

Increment the volume of the background audio clip
Parameters:
Name Type Description
increment float
Source:
Returns:
Type
void

incMasterVolume(increment) → {void}

Increment the Master volume
Parameters:
Name Type Description
increment float
Source:
Returns:
Type
void

initAudioContext() → {void}

Initializes the audio context to play sounds.
Source:
Returns:
Type
void

isBackgroundAudioPlaying() → {Boolean}

Returns if background audio is playing
Source:
Returns:
true if background audio is playing
Type
Boolean

loadAudio(clipName) → {void}

Load Audio Source into the resource map
Parameters:
Name Type Description
clipName String
Source:
Returns:
Type
void

playACue(clipName, volume) → {void}

Play an audioclip one time. no loop
Parameters:
Name Type Description
clipName String
volume float The volume the cue should be played at
Source:
Returns:
Type
void

playBackgroundAudio(clipName) → {void}

Play a audioclip on repeat. Stops current background clip if playing.
Parameters:
Name Type Description
clipName String
Source:
Returns:
Type
void

setBackgroundVolume(volume) → {void}

Set the volume of the background audio clip
Parameters:
Name Type Description
volume float
Source:
Returns:
Type
void

setCueVolume(volume) → {undefined}

Set the Cue volume
Parameters:
Name Type Description
volume type
Source:
Returns:
Type
undefined

setMasterVolume(volume) → {void}

Set the Master volume
Parameters:
Name Type Description
volume float
Source:
Returns:
Type
void

stopBackgroundAudio() → {void}

Stops current background audio clip if playing
Source:
Returns:
Type
void

unloadAudio(clipName) → {void}

Remove the reference to allow associated memory

be available for subsequent garbage collection

Parameters:
Name Type Description
clipName String
Source:
Returns:
Type
void