mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 00:27:58 +00:00
proper disposal of timeout
This commit is contained in:
parent
9428e6c1b8
commit
0ee67d8445
1 changed files with 1 additions and 15 deletions
|
@ -67,18 +67,6 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G
|
|||
this.detune = new Tone.Param(this._oscillator.detune, Tone.Type.Cents);
|
||||
this.detune.value = options.detune;
|
||||
|
||||
/**
|
||||
* The fadeIn time of the amplitude envelope.
|
||||
* @type {Time}
|
||||
*/
|
||||
this.fadeIn = options.fadeIn;
|
||||
|
||||
/**
|
||||
* The fadeOut time of the amplitude envelope.
|
||||
* @type {Time}
|
||||
*/
|
||||
this.fadeOut = options.fadeOut;
|
||||
|
||||
/**
|
||||
* The value that the buffer ramps to
|
||||
* @type {Gain}
|
||||
|
@ -98,9 +86,6 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G
|
|||
"frequency" : 440,
|
||||
"detune" : 0,
|
||||
"type" : "sine",
|
||||
"fadeIn" : 0,
|
||||
"fadeOut" : 0,
|
||||
"curve" : "linear",
|
||||
"onended" : Tone.noOp
|
||||
};
|
||||
|
||||
|
@ -185,6 +170,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G
|
|||
* @return {Tone.OscillatorNode} this
|
||||
*/
|
||||
Tone.OscillatorNode.prototype.dispose = function(){
|
||||
this.context.clearTimeout(this._timeout);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this.onended = null;
|
||||
this._oscillator.disconnect();
|
||||
|
|
Loading…
Reference in a new issue