Class: AudioClips

gEngine.AudioClips

new AudioClips()

Default Constructor

Provides support for loading and unloading of Audio clips.

Source:

Methods

(static) initAudioContext() → {void}

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

(static) initAudioContext() → {void}

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

(static) isBackgroundAudioPlaying() → {Boolean}

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

(static) isBackgroundAudioPlaying() → {Boolean}

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

(static) loadAudio(clipName) → {void}

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

(static) loadAudio(clipName) → {void}

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

(static) playACue(clipName) → {void}

Play an audioclip one time. no loop
Parameters:
Name Type Description
clipName String
Source:
Returns:
Type
void

(static) playACue(clipName) → {void}

Play an audioclip one time. no loop
Parameters:
Name Type Description
clipName String
Source:
Returns:
Type
void

(static) playBackgroundAudio(clipName) → {void}

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

(static) playBackgroundAudio(clipName) → {void}

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

(static) stopBackgroundAudio() → {void}

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

(static) stopBackgroundAudio() → {void}

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

(static) 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

(static) 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

gEngine.AudioClips

new AudioClips()

Default Constructor

Provides support for loading and unloading of Audio clips.

Source:

Methods

(static) initAudioContext() → {void}

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

(static) initAudioContext() → {void}

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

(static) isBackgroundAudioPlaying() → {Boolean}

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

(static) isBackgroundAudioPlaying() → {Boolean}

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

(static) loadAudio(clipName) → {void}

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

(static) loadAudio(clipName) → {void}

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

(static) playACue(clipName) → {void}

Play an audioclip one time. no loop
Parameters:
Name Type Description
clipName String
Source:
Returns:
Type
void

(static) playACue(clipName) → {void}

Play an audioclip one time. no loop
Parameters:
Name Type Description
clipName String
Source:
Returns:
Type
void

(static) playBackgroundAudio(clipName) → {void}

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

(static) playBackgroundAudio(clipName) → {void}

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

(static) stopBackgroundAudio() → {void}

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

(static) stopBackgroundAudio() → {void}

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

(static) 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

(static) 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