Skip to content

Commit

Permalink
Fix #2071: cancelScheduledValues with setValueCurveAtTime (#2109)
Browse files Browse the repository at this point in the history
If the cancelTime overlaps the setValueCurveAtTime event, remove the
event too.
  • Loading branch information
rtoy committed Mar 19, 2020
1 parent f98b69e commit 9d4d866
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3617,6 +3617,12 @@ Methods</h4>
are also removed if the hold time occurs after
{{AudioParam/cancelScheduledValues()/cancelTime!!argument}}.

For a {{AudioParam/setValueCurveAtTime()}}, let \(T_0\) and \(T_D\) be the corresponding
{{AudioParam/setValueCurveAtTime()/startTime!!argument}} and {{AudioParam/setValueCurveAtTime()/duration!!argument}}, respectively of this event.
Then if {{AudioParam/cancelScheduledValues()/cancelTime!!argument}}
is in the range \([T_0, T_0 + T_D]\), the event is
removed from the timeline.

<pre class=argumentdef for="AudioParam/cancelScheduledValues()">
cancelTime: The time after which any previously scheduled parameter changes will be cancelled. It is a time in the same time coordinate system as the {{AudioContext}}'s {{BaseAudioContext/currentTime}} attribute. <span class="synchronous">A {{RangeError}} exception MUST be thrown if <code>cancelTime</code> is negative or is not a finite number.</span> If <code>cancelTime</code> is less than {{BaseAudioContext/currentTime}}, it is clamped to {{BaseAudioContext/currentTime}}.
</pre>
Expand Down

0 comments on commit 9d4d866

Please sign in to comment.