Skip to content

Commit

Permalink
Removing disconnect on ended
Browse files Browse the repository at this point in the history
not necessary and caused a lot of issues

fixes #463
  • Loading branch information
tambien committed Aug 7, 2019
1 parent 86b2848 commit f7405d9
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions Tone/source/Oscillator.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,6 @@ Tone.Oscillator.prototype._start = function(time){
this.frequency.connect(this._oscillator.frequency);
this.detune.connect(this._oscillator.detune);

//disconnect onended
oscillator.onended = function(){
//defer the callback for the offline context rendering
setTimeout(function(){
if (this.frequency){
this.frequency.disconnect(oscillator.frequency);
}
if (this.detune){
this.detune.disconnect(oscillator.detune);
}
}.bind(this), 100);
}.bind(this);

//start the oscillator
time = this.toSeconds(time);
this._oscillator.start(time);
Expand Down

0 comments on commit f7405d9

Please sign in to comment.