Bug 215901 - Update PannerNode to support k-rate automation of its AudioParams
Summary: Update PannerNode to support k-rate automation of its AudioParams
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:
Keywords: InRadar
Depends on: 215904
Blocks: 212611
  Show dependency treegraph
 
Reported: 2020-08-27 13:31 PDT by Chris Dumez
Modified: 2020-08-28 19:33 PDT (History)
12 users (show)

See Also:


Attachments
Patch (189.04 KB, patch)
2020-08-28 10:25 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (189.03 KB, patch)
2020-08-28 10:52 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (189.03 KB, patch)
2020-08-28 11:23 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (189.06 KB, patch)
2020-08-28 11:57 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (187.71 KB, patch)
2020-08-28 15:00 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (163.39 KB, patch)
2020-08-28 16:51 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (163.47 KB, patch)
2020-08-28 16:55 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (163.47 KB, patch)
2020-08-28 17:47 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-27 13:31:09 PDT
Update PannerNode to support k-rate automation of its AudioParams.
Comment 1 Chris Dumez 2020-08-28 10:25:12 PDT
Created attachment 407480 [details]
Patch
Comment 2 Chris Dumez 2020-08-28 10:52:58 PDT
Created attachment 407486 [details]
Patch
Comment 3 Chris Dumez 2020-08-28 11:23:38 PDT
Created attachment 407487 [details]
Patch
Comment 4 Chris Dumez 2020-08-28 11:57:11 PDT
Created attachment 407492 [details]
Patch
Comment 5 Chris Dumez 2020-08-28 15:00:48 PDT
Created attachment 407504 [details]
Patch
Comment 6 Chris Dumez 2020-08-28 15:52:16 PDT
Comment on attachment 407504 [details]
Patch

Trying to see if I can simplify the patch a bit by leaving the caching out.
Comment 7 Chris Dumez 2020-08-28 16:51:54 PDT
Created attachment 407515 [details]
Patch
Comment 8 Chris Dumez 2020-08-28 16:55:59 PDT
Created attachment 407516 [details]
Patch
Comment 9 Chris Dumez 2020-08-28 16:56:42 PDT
(In reply to Chris Dumez from comment #8)
> Created attachment 407516 [details]
> Patch

Ok, got the patch as small as I could.
Comment 10 Darin Adler 2020-08-28 17:05:26 PDT
Comment on attachment 407516 [details]
Patch

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

> Source/WebCore/Modules/webaudio/AudioParam.cpp:277
> +        for (unsigned i = 0; i < numberOfValues; ++i)

I suggest starting with 1 so we don’t do values[0] = values[0].

> Source/WebCore/Modules/webaudio/PannerNode.cpp:501
> +    double azimuth = rad2deg(acos(std::clamp(projectedSource.dot(listenerRight), -1.0f, 1.0f)));

std::rad2deg, std::acos
Comment 11 Chris Dumez 2020-08-28 17:45:04 PDT
(In reply to Darin Adler from comment #10)
> Comment on attachment 407516 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=407516&action=review
> 
> > Source/WebCore/Modules/webaudio/AudioParam.cpp:277
> > +        for (unsigned i = 0; i < numberOfValues; ++i)
> 
> I suggest starting with 1 so we don’t do values[0] = values[0].
> 
> > Source/WebCore/Modules/webaudio/PannerNode.cpp:501
> > +    double azimuth = rad2deg(acos(std::clamp(projectedSource.dot(listenerRight), -1.0f, 1.0f)));
> 
> std::rad2deg, std::acos

rad2deg is from MathExtras.h. Will fix acos.
Comment 12 Chris Dumez 2020-08-28 17:47:13 PDT
Created attachment 407520 [details]
Patch
Comment 13 EWS 2020-08-28 19:32:42 PDT
Committed r266319: <https://trac.webkit.org/changeset/266319>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407520 [details].
Comment 14 Radar WebKit Bug Importer 2020-08-28 19:33:17 PDT
<rdar://problem/67975302>