remove implicit "stop" scheduling

fixes #778
This commit is contained in:
Yotam Mann 2021-01-13 10:18:37 -05:00
parent 33e14d06eb
commit 0b7a352f7a

View file

@ -167,8 +167,6 @@ export class ToneEvent<ValueType = any> extends ToneWithContext<ToneEventOptions
duration = Math.min(duration, nextEvent.time - startTick);
}
if (duration !== Infinity) {
// schedule a stop since it's finite duration
this._state.setStateAtTime("stopped", startTick + duration + 1, { id: -1 });
duration = new TicksClass(this.context, duration);
}
const interval = new TicksClass(this.context, this._getLoopDuration());