correctly restarting PulseOscillator

This commit is contained in:
Yotam Mann 2018-05-20 17:36:07 -04:00
parent ee18f87106
commit 54276555f2

View file

@ -127,6 +127,8 @@ define(["Tone/core/Tone", "Tone/source/Source", "Tone/source/Oscillator",
*/
Tone.PulseOscillator.prototype.restart = function(time){
this._sawtooth.restart(time);
this._widthGate.gain.cancelScheduledValues(time);
this._widthGate.gain.setValueAtTime(1, time);
};
/**