Skip to content

Commit db5002f

Browse files
Updated BaseSoundManager playAudioSprite method to return value from sound play method call
1 parent 7a259da commit db5002f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/sound/BaseSoundManager.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,12 @@ var BaseSoundManager = new Class({
194194
* @param {string} key - Asset key for the sound.
195195
* @param {string} spriteName - The name of the sound sprite to play.
196196
* @param {ISoundConfig} [config] - An optional config object containing default sound settings.
197+
* @returns {boolean} Whether the audio sprite sound started playing successfully.
197198
*/
198199
playAudioSprite: function (key, spriteName, config) {
199200
var sound = this.addAudioSprite(key);
200201
sound.once('ended', sound.destroy, sound);
201-
sound.play(spriteName, config);
202+
return sound.play(spriteName, config);
202203
},
203204
/**
204205
* Removes a sound from the sound manager.

0 commit comments

Comments
 (0)