From aaaaf7ede3aaabafca566d135d0ff41805a77f24 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 May 2013 16:19:33 +0100 Subject: [PATCH] Preparing for doc merge --- build/phaser.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build/phaser.js b/build/phaser.js index a32484be..edf9c79d 100644 --- a/build/phaser.js +++ b/build/phaser.js @@ -7317,8 +7317,8 @@ var Phaser; Sound.prototype.setDecodedBuffer = function (data) { this._buffer = data; this.isDecoding = false; - this.play(); - }; + //this.play(); + }; Sound.prototype.play = function () { if(this._buffer === null || this.isDecoding === true) { return; @@ -7424,7 +7424,6 @@ var Phaser; SoundManager.prototype.play = function (key, volume, loop) { if (typeof volume === "undefined") { volume = 1; } if (typeof loop === "undefined") { loop = false; } - var _this = this; if(this._context === null) { return; } @@ -7437,7 +7436,7 @@ var Phaser; var tempSound = new Phaser.Sound(this._context, this._gainNode, null, volume, loop); // this is an async process, so we can return the Sound object anyway, it just won't be playing yet this.decode(key, function () { - return _this.play(key); + return tempSound.play(); }, tempSound); return tempSound; }