new AudioClips()
Default Constructor
Provides support for loading and unloading of Audio clips.
Methods
(static) initAudioContext() → {void}
Initializes the audio context to play sounds.
Returns:
- Type
- void
(static) isBackgroundAudioPlaying() → {Boolean}
Returns if background audio is playing
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 |
Returns:
- Type
- void
(static) playACue(clipName) → {void}
Play an audioclip one time. no loop
Parameters:
Name | Type | Description |
---|---|---|
clipName |
String |
Returns:
- Type
- void
(static) playBackgroundAudio(clipName) → {void}
Play a audioclip on repeat. Stops current background clip if playing.
Parameters:
Name | Type | Description |
---|---|---|
clipName |
String |
Returns:
- Type
- void
(static) stopBackgroundAudio() → {void}
Stops current background audio clip if playing
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 |
Returns:
- Type
- void