canceling next events on stop

This commit is contained in:
Yotam Mann 2015-12-05 13:09:25 -05:00
parent 33df9eec3a
commit f0857f2e08

View file

@ -225,6 +225,7 @@ define(["Tone/core/Tone", "Tone/core/Transport", "Tone/core/Type", "Tone/core/Ti
* @return {Tone.Event} this
*/
Tone.Event.prototype.stop = function(time){
this.cancel(time);
time = this.toTicks(time);
if (this._state.getStateAtTime(time) === Tone.State.Started){
this._state.setStateAtTime(Tone.State.Stopped, time);