mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
removing the disconnect onended
causes glitches and clicks. might be because the frequency.disconnect is not fully implemented
This commit is contained in:
parent
934ab5d77f
commit
fa95e74ab9
1 changed files with 0 additions and 9 deletions
|
@ -126,15 +126,6 @@ export class Oscillator extends Source<ToneOscillatorOptions> implements ToneOsc
|
|||
this.frequency.connect(this._oscillator.frequency);
|
||||
this.detune.connect(this._oscillator.detune);
|
||||
|
||||
// disconnect onended
|
||||
oscillator.onended = () => {
|
||||
// defer the callback for the offline context rendering
|
||||
setTimeout(() => {
|
||||
this.frequency.disconnect(oscillator.frequency);
|
||||
this.detune.disconnect(oscillator.detune);
|
||||
}, 100);
|
||||
};
|
||||
|
||||
// start the oscillator
|
||||
time = this.toSeconds(time);
|
||||
this._oscillator.start(time);
|
||||
|
|
Loading…
Reference in a new issue