WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
213393
Added getFloatTimeDomainData method to AnalyserNode
https://bugs.webkit.org/show_bug.cgi?id=213393
Summary
Added getFloatTimeDomainData method to AnalyserNode
Clark Wang
Reported
2020-06-19 11:09:53 PDT
Added getFloatTimeDomainData method to AnalyserNode
Attachments
Patch
(6.53 KB, patch)
2020-06-19 11:13 PDT
,
Clark Wang
no flags
Details
Formatted Diff
Diff
Patch
(13.09 KB, patch)
2020-06-19 15:27 PDT
,
Clark Wang
no flags
Details
Formatted Diff
Diff
Patch
(11.78 KB, patch)
2020-06-22 08:12 PDT
,
Clark Wang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Clark Wang
Comment 1
2020-06-19 11:13:18 PDT
Created
attachment 402296
[details]
Patch
Chris Dumez
Comment 2
2020-06-19 11:36:50 PDT
Comment on
attachment 402296
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=402296&action=review
> Source/WebCore/Modules/webaudio/AnalyserNode.idl:45 > + void getFloatTimeDomainData(Float32Array? array); // FIXME: The parameter should not be nullable.
Since this is new code, why a FIXME comment? Why not make the parameter non-nullable? Also, everything you add should be behind the Modern Web Audio flag so: [EnabledBySetting=ModernUnprefixedWebAudio] void getFloatTimeDomainData(Float32Array array);
> Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:265 > +void RealtimeAnalyser::getFloatTimeDomainData(Float32Array* destinationArray)
If this implementation is based on the Blink one, please state so in the ChangeLog file.
> Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:273 > + size_t len = std::min(fftSize, destinationArray->length());
No abbreviations in WebKit: len -> length
> Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:285 > + for (unsigned i = 0; i < len; ++i) {
len is a size_t so please use same type for i.
> Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:287 > + float value = inputBuffer[(i + writeIndex - fftSize + InputBufferSize) % InputBufferSize];
This local variable is not needed.
Clark Wang
Comment 3
2020-06-19 15:27:04 PDT
Created
attachment 402335
[details]
Patch
Chris Dumez
Comment 4
2020-06-19 17:52:19 PDT
Comment on
attachment 402335
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=402335&action=review
> Source/WebCore/Modules/webaudio/AnalyserNode.h:58 > + void getFloatTimeDomainData(const RefPtr<JSC::Float32Array>& array) { m_analyser.getFloatTimeDomainData(array.get()); }
const Ref<JSC::Float32Array>& Same for others.
> Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:-107 > - return;
Please configure your IDE to stop doing these things. We try to avoid unrelated changes in patches as much as possible.
> Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:-207 > - if (!destinationArray)
Since destinationArray cannot take null anymore, the parameter should be of type: Float32Array& destinationArray This means you'll need to update AnalyzerNode::getFloatFrequencyData() to take in a Ref<> instead of a RefPtr<>.
> Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:-232 > - if (!destinationArray)
ditto
> Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:-269 > - if (!destinationArray)
ditto.
Clark Wang
Comment 5
2020-06-22 08:12:36 PDT
Created
attachment 402474
[details]
Patch
EWS
Comment 6
2020-06-22 12:26:49 PDT
Committed
r263359
: <
https://trac.webkit.org/changeset/263359
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 402474
[details]
.
Radar WebKit Bug Importer
Comment 7
2020-06-22 12:27:17 PDT
<
rdar://problem/64603798
>
Chris Dumez
Comment 8
2021-01-05 08:30:38 PST
***
Bug 220023
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug