Bug 215301 - Align existing AudioParam API with the specification
Summary: Align existing AudioParam API with the specification
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://www.w3.org/TR/webaudio/#Audio...
Keywords: InRadar
Depends on: 215289
Blocks: 212611
  Show dependency treegraph
 
Reported: 2020-08-07 16:38 PDT by Chris Dumez
Modified: 2020-08-10 12:31 PDT (History)
13 users (show)

See Also:


Attachments
WIP Patch (12.71 KB, patch)
2020-08-07 17:24 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (59.92 KB, patch)
2020-08-07 18:23 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (157.86 KB, patch)
2020-08-07 19:34 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (163.21 KB, patch)
2020-08-07 19:42 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (163.37 KB, patch)
2020-08-10 11:06 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (173.63 KB, patch)
2020-08-10 11:58 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-08-07 16:38:02 PDT
Align existing AudioParam API with the specification:
- https://www.w3.org/TR/webaudio/#AudioParam
Comment 1 Chris Dumez 2020-08-07 17:24:08 PDT
Created attachment 406234 [details]
WIP Patch
Comment 2 Chris Dumez 2020-08-07 18:23:31 PDT
Created attachment 406238 [details]
WIP Patch
Comment 3 Chris Dumez 2020-08-07 19:34:08 PDT
Created attachment 406241 [details]
WIP Patch
Comment 4 Chris Dumez 2020-08-07 19:42:41 PDT
Created attachment 406242 [details]
Patch
Comment 5 Sam Weinig 2020-08-10 10:15:04 PDT
Comment on attachment 406242 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=406242&action=review

> Source/WebCore/ChangeLog:19
> +        - Throw exceptions when events overlap. This part is based on Chromium's implementation here:
> +          - https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc#L513

Is this not spec'd? If not, is there bug filed on the spec to add it?

> Source/WebCore/Modules/webaudio/AudioParamTimeline.h:90
> +        double time() const { return m_time; }

It may not make sense or make bindings more troublesome, but can we use something like WallTime/MonotonicTime for these time values?
Comment 6 Chris Dumez 2020-08-10 11:01:45 PDT
Comment on attachment 406242 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=406242&action=review

>> Source/WebCore/ChangeLog:19
>> +          - https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc#L513
> 
> Is this not spec'd? If not, is there bug filed on the spec to add it?

Yes, it is specified here:
https://webaudio.github.io/web-audio-api/#dfn-automation-event

"""
If setValueCurveAtTime() is called for time 𝑇
T
 and duration 𝐷
D
 and there are any events having a time strictly greater than 𝑇
T
, but strictly less than 𝑇+𝐷
T
+
D
, then a NotSupportedError exception MUST be thrown. In other words, it’s not ok to schedule a value curve during a time period containing other events, but it’s ok to schedule a value curve exactly at the time of another event.
Similarly a NotSupportedError exception MUST be thrown if any automation method is called at a time which is contained in [𝑇,𝑇+𝐷)
[
T
,
T
+
D
)
, 𝑇
T
 being the time of the curve and 𝐷
D
 its duration.
"""
Comment 7 Chris Dumez 2020-08-10 11:06:31 PDT
Created attachment 406312 [details]
Patch
Comment 8 Chris Dumez 2020-08-10 11:58:30 PDT
Created attachment 406314 [details]
Patch
Comment 9 EWS 2020-08-10 12:29:07 PDT
Committed r265440: <https://trac.webkit.org/changeset/265440>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 406314 [details].
Comment 10 Radar WebKit Bug Importer 2020-08-10 12:31:36 PDT
<rdar://problem/66793862>