From 45ddec7e27af3ded3ebb81d2d2200e6331deb8f1 Mon Sep 17 00:00:00 2001 From: Jer Noble Date: Thu, 27 Mar 2014 10:57:27 -0700 Subject: [PATCH 1/1] Fix .muted when playing. --- sound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound.js b/sound.js index efddc12..c4f9c0e 100644 --- a/sound.js +++ b/sound.js @@ -146,7 +146,7 @@ Sound.prototype = { playInternal: function() { this.gainNode = Sound.audioContext.createGainNode(); - this.gainNode.gain.value = this._volume; + this.gainNode.gain.value = this._muted ? 0 : this._volume; this.gainNode.connect(Sound.audioContext.destination); this.node = Sound.audioContext.createBufferSource(); -- 2.40.1