Whilst archiving a site recently, I noticed the following warning in Chrome dev tools which looked pretty urgent:
[Deprecation] GainNode.gain.value setter smoothing is deprecated and will be removed in M64, around January 2018. Please use setTargetAtTime() instead if smoothing is needed. See [https://www.chromestatus.com/features/5287995770929152] for more details. Animation.initializeWaveform @ animations.js:44 AVUgenTwo.js:41
I dutifully followed the Chrome Status feature link to read about dezippering. You what?!
Dezippering is actually quite simple, it just refers to the idea of smoothly transitioning to a value, rather than setting it immediately. That means this is not the immediate assignment you might think (similar to the attack length in an ADSR audio envelope)
gainNode.gain.value = 0.6;
Chrome used to do this dezippering by default/magic when you set a value. In line with the spec, they removed the behaviour.
To clean up and remove the warning you’ll need to use either set
setTargetAtTime. The latter was useful to me to remove audible clicks now that the magic dezippering/attack phase had been removed:
gainNode.gain.setTargetAtTime(self.gainValue, audioCtx.currentTime, self.dezipSeconds); oscillator.frequency.setValueAtTime(self.oscillatorFrequency, audioCtx.currentTime); // value in hertz
The full commit is on Github.