On 3/22/19 5:58 PM, Balaji Janakarajan Hari wrote:
Hi Josh

1. We are trying to implement the functionality and have a few q's. The
setValueCurveAtTime
<http://definitelytyped.org/docs/webaudioapi--waa/interfaces/audioparam.html#setvaluecurveattime>
talks
about Automation event, which I assume that the term
*UserAutomationEvent *refers
to in the issue <https://github.com/servo/media/issues/204> but could you
please help us understand what *UserAutomationEvent exactly* does and where
the *setValueCurveAtTime *fn would be called?

The names I refer to in the issue are types that can be found in the actual codebase: https://github.com/servo/media/blob/9d9f557fc7bfa78075b83edd822557548c9d4344/audio/src/param.rs#L259-L280

https://github.com/web-platform-tests/wpt/blob/master/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurveAtTime.html is an example of test code that uses setValueCurveAtTime. https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/setValueCurveAtTime contains an example of working code that uses the API.

2. Is there a similar implementation done previously that we could use as
reference as well?

The existing automation events like SetValueAtTime and RampToValueAtTime could be useful references.

3. It does refer
<https://webaudio.github.io/web-audio-api/#dom-audioparam-setvaluecurveattime>that
I would need to call *setValueAtTime *and I assume this is implemented
<https://github.com/servo/media/search?q=setValueAtTime&unscoped_q=setValueAtTime>
as I see here and can you also let us know where the  *setValueAtTime*  is
defined?

If I understand the question, I believe you are looking for https://github.com/servo/servo/issues/22897 which defines the DOM API that websites can make use of.

4. The fn does two commands as per the teams understanding,
During the time interval, it sets array of values
After the time, startTime+duration, a constant value would be set until
another automationEvent starts.

So could you please help us in figuring out where would this value be
passed and where/how the fn knows that another automationEvent would start?

The processing for automation events happens in this code: https://github.com/servo/media/blob/9d9f557fc7bfa78075b83edd822557548c9d4344/audio/src/param.rs#L357-L416

The code that decides which event to process lives here: https://github.com/servo/media/blob/9d9f557fc7bfa78075b83edd822557548c9d4344/audio/src/param.rs#L113-L166

Does that help?

Cheers,
Josh
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to