SoundManager#addSprite()

addSprite(key) → {Phaser.AudioSprite} Adds a new AudioSprite into the SoundManager. Parameters Name Type Description key string Asset key for the sound. Returns Phaser.AudioSprite - The new AudioSprite instance. Source code: sound/SoundManager.js (Line 564)

SoundManager#add()

add(key, volume, loop, connect) → {Phaser.Sound} Adds a new Sound into the SoundManager. Parameters Name Type Argument Default Description key string Asset key for the sound. volume number <optional> 1 Default value for the volume. loop boolean <optional> false Whether or not the sound will loop. connect boolean <optional> true Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. Ret

Sound#volume

volume : number Gets or sets the volume of this sound, a value between 0 and 1. The value given is clamped to the range 0 to 1. Source code: sound/Sound.js (Line 1155)

Sound#usingWebAudio

[readonly] usingWebAudio : boolean true if this sound is being played with Web Audio. Source code: sound/Sound.js (Line 150)

Sound#usingAudioTag

usingAudioTag : boolean true if the sound is being played via the Audio tag. Source code: sound/Sound.js (Line 155)

Sound#totalDuration

totalDuration : number The total duration of the sound in seconds. Source code: sound/Sound.js (Line 62)

Sound#stopTime

stopTime : number The time the sound stopped. Source code: sound/Sound.js (Line 93)

Sound#stop()

stop() Stop playing this sound. Source code: sound/Sound.js (Line 858)

Sound#startTime

startTime : number The time the Sound starts at (typically 0 unless starting from a marker) Source code: sound/Sound.js (Line 68)

Sound#Sound

new Sound(game, key, volume, loop) The Sound class constructor. Parameters Name Type Argument Default Description game Phaser.Game Reference to the current game instance. key string Asset key for the sound. volume number <optional> 1 Default value for the volume, between 0 and 1. loop boolean <optional> false Whether or not the sound will loop. Source code: sound/Sound.js (Line 17)