Skip to content

Commit 6c469ec

Browse files
Added add method docs
1 parent dd56f4f commit 6c469ec

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

v3/src/sound/webaudio/WebAudioSoundManager.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ var WebAudioSoundManager = new Class({
6767
}
6868
return new (window['AudioContext'] || window['webkitAudioContext'])();
6969
},
70+
/**
71+
* Adds a new sound into the sound manager.
72+
*
73+
* @method Phaser.Sound.WebAudioSoundManager#add
74+
* @param {string} key - Asset key for the sound.
75+
* @param {ISoundConfig} [config] - An optional config object containing default sound settings.
76+
* @returns {Phaser.Sound.WebAudioSound} The new sound instance.
77+
*/
7078
add: function (key, config) {
7179
var sound = new WebAudioSound(this, key, config);
7280
this.sounds.push(sound);

0 commit comments

Comments
 (0)