Hi Josh, Thank you for the reply. It clarifies a lot of doubts.
1. Just checking if we have got the entire idea for the first task right: So what we have to do is uncomment the line 277 in param.rs <https://github.com/servo/media/blob/1c4a8917a2c44bf9901dcf41919ec567967a36de/audio/src/param.rs#L277> and then add a new enum variant to AutomationEvent and write the processing algorithm as defined here <https://webaudio.github.io/web-audio-api/#dom-audioparam-setvaluecurveattime> for SetValueCurveAtTime and implement it similar to the RampValueAtTime <https://github.com/servo/media/blob/1c4a8917a2c44bf9901dcf41919ec567967a36de/audio/src/param.rs#L384-L405> implementation? 2. For the 2nd part which is the example, I came across the constant_source.rs <https://github.com/servo/media/blob/029475e1412d97c6350016d9a9db7c1f1203b523/examples/constant_source.rs> file that uses the RampValueAtTime <https://github.com/servo/media/blob/1c4a8917a2c44bf9901dcf41919ec567967a36de/audio/src/param.rs#L384-L405>, so can I write a similar example to check the output of the SetValueCurveAtTime function that we will be adding to param.rs? I'm assuming we will also be expecting an audio output. Thanks for your patience and helping us out, Akhilesh On Fri, Mar 22, 2019 at 10:52 PM Josh Bowman-Matthews <j...@joshmatthews.net> wrote: > 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 > _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo