diff --git a/src/index.js b/src/index.js index a5db0e7..4649b20 100644 --- a/src/index.js +++ b/src/index.js @@ -76,8 +76,7 @@ AudioEngine.prototype.decodeSound = function (sound) { } var storedContext = this; - - loaderPromise.then( + return loaderPromise.then( function (decodedAudio) { storedContext.audioBuffers[sound.md5] = new Tone.Buffer(decodedAudio); }, @@ -319,4 +318,3 @@ AudioPlayer.prototype.setVolume = function (value) { }; module.exports = AudioEngine; -