diff --git a/src/howler.core.js b/src/howler.core.js index 3c2c4bb1..505002bc 100644 --- a/src/howler.core.js +++ b/src/howler.core.js @@ -81,7 +81,7 @@ // When using Web Audio, we just need to adjust the master gain. if (self.usingWebAudio) { - self.masterGain.gain.value = vol; + self.masterGain.gain.setValueAtTime(vol, Howler.ctx.currentTime); } // Loop through and change volume for all HTML5 audio nodes. @@ -123,7 +123,7 @@ // With Web Audio, we just need to mute the master gain. if (self.usingWebAudio) { - self.masterGain.gain.value = muted ? 0 : self._volume; + self.masterGain.gain.setValueAtTime(muted ? 0 : self._volume, tHowler.ctx.currentTime); } // Loop through and mute all HTML5 Audio nodes. @@ -2212,7 +2212,7 @@ // Create and expose the master GainNode when using Web Audio (useful for plugins or advanced usage). if (Howler.usingWebAudio) { Howler.masterGain = (typeof Howler.ctx.createGain === 'undefined') ? Howler.ctx.createGainNode() : Howler.ctx.createGain(); - Howler.masterGain.gain.value = Howler._muted ? 0 : 1; + Howler.masterGain.gain.setValueAtTime(Howler._muted ? 0 : 1, Howler.ctx.currentTime); Howler.masterGain.connect(Howler.ctx.destination); }