]> 105106.c2e0p.group Git - sound.git/blobdiff - sound.js
Fix .muted when playing.
[sound.git] / 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();
 
        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();
                this.gainNode.connect(Sound.audioContext.destination);
 
                this.node = Sound.audioContext.createBufferSource();