]> 105106.c2e0p.group Git - sound.git/commitdiff
Fix .muted when playing.
authorJer Noble <[email protected]>
Thu, 27 Mar 2014 17:57:27 +0000 (10:57 -0700)
committerJer Noble <[email protected]>
Thu, 27 Mar 2014 17:57:27 +0000 (10:57 -0700)
sound.js

index efddc125262dca3339cddd21786db7d6761837e3..c4f9c0eb27329c84bbfa0564a678ea1e13f8945f 100644 (file)
--- 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();