new AudioClips()
Default Constructor
Provides support for loading and unloading of Audio clips.
Methods
incBackgroundVolume(increment) → {void}
Increment the volume of the background audio clip
Parameters:
Name | Type | Description |
---|---|---|
increment |
float |
Returns:
- Type
- void
incMasterVolume(increment) → {void}
Increment the Master volume
Parameters:
Name | Type | Description |
---|---|---|
increment |
float |
Returns:
- Type
- void
initAudioContext() → {void}
Initializes the audio context to play sounds.
Returns:
- Type
- void
isBackgroundAudioPlaying() → {Boolean}
Returns if background audio is playing
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 |
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 |
Returns:
- Type
- void
playBackgroundAudio(clipName) → {void}
Play a audioclip on repeat. Stops current background clip if playing.
Parameters:
Name | Type | Description |
---|---|---|
clipName |
String |
Returns:
- Type
- void
setBackgroundVolume(volume) → {void}
Set the volume of the background audio clip
Parameters:
Name | Type | Description |
---|---|---|
volume |
float |
Returns:
- Type
- void
setCueVolume(volume) → {undefined}
Set the Cue volume
Parameters:
Name | Type | Description |
---|---|---|
volume |
type |
Returns:
- Type
- undefined
setMasterVolume(volume) → {void}
Set the Master volume
Parameters:
Name | Type | Description |
---|---|---|
volume |
float |
Returns:
- Type
- void
stopBackgroundAudio() → {void}
Stops current background audio clip if playing
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 |
Returns:
- Type
- void