From d09c95118e6da2466bbfe7ed76776dccd223e893 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Tue, 1 Nov 2016 16:33:18 -0400 Subject: [PATCH] lint --- src/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 81b1143..155a888 100644 --- a/src/index.js +++ b/src/index.js @@ -85,9 +85,9 @@ AudioEngine.prototype.playSound = function (index) { // if the soundplayer exists and its buffer has loaded if (this.soundPlayers[index] && this.soundPlayers[index].buffer.loaded) { // stop the sound if it's already playing - var bufferSource = this.soundPlayers[index].bufferSource; - if (bufferSource) { - bufferSource.stop(); + var b = this.soundPlayers[index].bufferSource; + if (b) { + b.stop(); } // create a new buffer source to play the sound var bufferSource = new Tone.BufferSource(this.soundPlayers[index].buffer.get()); @@ -96,8 +96,8 @@ AudioEngine.prototype.playSound = function (index) { bufferSource.playbackRate.value = this._getPitchRatio(); this.soundPlayers[index].bufferSource = bufferSource; - return new Promise(function(resolve) { - bufferSource.onended = function(){resolve()}; + return new Promise(function (resolve) { + bufferSource.onended = function (){resolve();}; }); } };