From 19beacc5ce6a80b660181db7647e0a1bd37dcdc2 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Sat, 19 Nov 2016 14:18:42 -0500 Subject: [PATCH] load adpcm sounds --- src/index.js | 54 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/src/index.js b/src/index.js index 8f8f070..ebf8138 100644 --- a/src/index.js +++ b/src/index.js @@ -31,7 +31,8 @@ function AudioEngine (sounds) { // load sounds - this.soundPlayers = this.loadSounds(sounds); + this.soundPlayers = []; + this.loadSounds(sounds); // Tone.Buffer.on('load', this._soundsLoaded.bind(this)); // soundfont setup @@ -63,38 +64,43 @@ function AudioEngine (sounds) { } AudioEngine.prototype.loadSounds = function (sounds) { - var soundPlayers = []; - for (var i=0; i