@@ -558,13 +558,16 @@ define(function (require) {
558
558
{
559
559
this . control . exponentialRampToValueAtTime ( this . checkExpInput ( this . aLevel ) , t ) ;
560
560
valToSet = this . checkExpInput ( this . control . getValueAtTime ( t ) ) ;
561
+ this . control . cancelScheduledValues ( t ) ;
561
562
this . control . exponentialRampToValueAtTime ( valToSet , t ) ;
562
563
}
563
564
else
564
565
{
565
566
this . control . linearRampToValueAtTime ( this . aLevel , t ) ;
566
567
valToSet = this . control . getValueAtTime ( t ) ;
568
+ this . control . cancelScheduledValues ( t ) ;
567
569
this . control . linearRampToValueAtTime ( valToSet , t ) ;
570
+
568
571
}
569
572
570
573
// decay to decay level (if using ADSR, then decay level == sustain level)
@@ -573,12 +576,14 @@ define(function (require) {
573
576
{
574
577
this . control . exponentialRampToValueAtTime ( this . checkExpInput ( this . dLevel ) , t ) ;
575
578
valToSet = this . checkExpInput ( this . control . getValueAtTime ( t ) ) ;
579
+ this . control . cancelScheduledValues ( t ) ;
576
580
this . control . exponentialRampToValueAtTime ( valToSet , t ) ;
577
581
}
578
582
else
579
583
{
580
584
this . control . linearRampToValueAtTime ( this . dLevel , t ) ;
581
585
valToSet = this . control . getValueAtTime ( t ) ;
586
+ this . control . cancelScheduledValues ( t ) ;
582
587
this . control . linearRampToValueAtTime ( valToSet , t ) ;
583
588
}
584
589
} ;
@@ -680,12 +685,14 @@ define(function (require) {
680
685
{
681
686
this . control . exponentialRampToValueAtTime ( this . checkExpInput ( this . rLevel ) , t ) ;
682
687
valToSet = this . checkExpInput ( this . control . getValueAtTime ( t ) ) ;
688
+ this . control . cancelScheduledValues ( t ) ;
683
689
this . control . exponentialRampToValueAtTime ( valToSet , t ) ;
684
690
}
685
691
else
686
692
{
687
693
this . control . linearRampToValueAtTime ( this . rLevel , t ) ;
688
694
valToSet = this . control . getValueAtTime ( t ) ;
695
+ this . control . cancelScheduledValues ( t ) ;
689
696
this . control . linearRampToValueAtTime ( valToSet , t ) ;
690
697
}
691
698
0 commit comments