Skip to content

Commit

Permalink
Merge pull request #1210 from ilyabesk/patch-2
Browse files Browse the repository at this point in the history
Fix for the issue with volume reset after _unlockAudio()
  • Loading branch information
goldfire authored Nov 22, 2019
2 parents 47c885c + f1430ed commit e25974d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,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.setValueAtTime(Howler._muted ? 0 : 1, Howler.ctx.currentTime);
Howler.masterGain.gain.setValueAtTime(Howler._muted ? 0 : Howler._volume, Howler.ctx.currentTime);
Howler.masterGain.connect(Howler.ctx.destination);
}

Expand Down

0 comments on commit e25974d

Please sign in to comment.