Behaviour of AudioParam.cancelScheduledValues

Hi fellow developers,

I have two questions regarding AudioParam automation in the Web Audio spec:

1.

To me, it is unclear what happens, when calling 
AudioParam.cancelScheduledValues while an automation curve is active.

An example:

gainNode.gain.value = 0.5;
gainNode.gain.linearRampToValueAtTime(0, context.currentTime + 3);
/* One second later, while the linear curve is active, we call */
gainNode.gain.cancelScheduledValues(context.currentTime);

Of course, the linear ramp will be cancelled, because endTime of 
linearRampToValue is greater than the cancelTime in cancelScheduledValues.
I assume that the value should immediately jump back to the initial one, 
i.e. 0.5. Or am I wrong?

2.

Currently, there is this sentence in the spec at 
AudioParam.cancelScheduledValues [1]:
"Active setTargetAtTime automations (those with cancelTime less than the 
supplied time value) will also be cancelled."

Would this not also apply to active linearRampToValueAtTime, 
setValueCurveAtTime and exponentialRampToValue automations?

Thank you,
Sebastian

[1] 
https://webaudio.github.io/web-audio-api/#widl-AudioParam-cancelScheduledValues-AudioParam-double-cancelTime

Received on Tuesday, 22 November 2016 12:26:26 UTC