WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
46527
Add BiquadProcessor files
https://bugs.webkit.org/show_bug.cgi?id=46527
Summary
Add BiquadProcessor files
Chris Rogers
Reported
2010-09-24 15:24:01 PDT
Add BiquadProcessor files
Attachments
Patch
(9.92 KB, patch)
2010-09-24 15:25 PDT
,
Chris Rogers
no flags
Details
Formatted Diff
Diff
Patch
(9.44 KB, patch)
2010-10-04 15:56 PDT
,
Chris Rogers
no flags
Details
Formatted Diff
Diff
Patch
(9.30 KB, patch)
2010-10-04 16:47 PDT
,
Chris Rogers
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Rogers
Comment 1
2010-09-24 15:25:42 PDT
Created
attachment 68769
[details]
Patch
Chris Rogers
Comment 2
2010-10-01 14:51:37 PDT
BiquadProcessor is used by the various filter AudioNode objects such as LowPass2FilterNode
Kenneth Russell
Comment 3
2010-10-04 14:40:52 PDT
Comment on
attachment 68769
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=68769&action=review
Several issues. Also please update the license text per offline discussion.
> WebCore/webaudio/BiquadProcessor.cpp:58 > + m_parameter3 = AudioParam::create("unused", 0.0, 0.0, 1.0);
These are the same parameters as LowPass2. Something looks wrong.
> WebCore/webaudio/BiquadProcessor.cpp:68 > + m_parameter3 = AudioParam::create("unused", 0.0, 0.0, 1.0);
These parameters look the same as those for Peaking aside from m_parameter3 being "unused" instead of "gain". I don't know what the right values should be but please double-check both.
> WebCore/webaudio/BiquadProcessor.cpp:73 > + m_parameter3 = AudioParam::create("unused", 0.0, 0.0, 1.0);
Two assignments to m_parameter3 and none to m_parameter2.
> WebCore/webaudio/BiquadProcessor.cpp:78 > + m_parameter3 = AudioParam::create("unused", 0.0, 0.0, 1.0);
Two assignments to m_parameter3 and none to m_parameter2.
> WebCore/webaudio/BiquadProcessor.h:65 > + AudioParam& parameter3() { return *m_parameter3; }
Especially since subclasses take the addresses of these references, I think you should return pointers here. You can indicate in the documentation that the BiquadProcessor owns the storage for the parameters.
> WebCore/webaudio/BiquadProcessor.h:70 > + FilterType m_type; // lowpass, highpass, etc.
As many of these protected fields should be made private as possible. Also, this comment is unnecessary because the FilterType enum is self-documenting.
Chris Rogers
Comment 4
2010-10-04 15:56:47 PDT
Created
attachment 69707
[details]
Patch
Chris Rogers
Comment 5
2010-10-04 16:01:03 PDT
Comment on
attachment 68769
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=68769&action=review
Also updated LICENSE
>> WebCore/webaudio/BiquadProcessor.cpp:58 >> + m_parameter3 = AudioParam::create("unused", 0.0, 0.0, 1.0); > > These are the same parameters as LowPass2. Something looks wrong.
This should be OK. They do have the same parameters.
>> WebCore/webaudio/BiquadProcessor.cpp:68 >> + m_parameter3 = AudioParam::create("unused", 0.0, 0.0, 1.0); > > These parameters look the same as those for Peaking aside from m_parameter3 being "unused" instead of "gain". I don't know what the right values should be but please double-check both.
Yes, these ones were not quite right. I've fixed peaking to use the standard three parameters: frequency, gain, Q and for Allpass: frequency, Q
>> WebCore/webaudio/BiquadProcessor.cpp:73 >> + m_parameter3 = AudioParam::create("unused", 0.0, 0.0, 1.0); > > Two assignments to m_parameter3 and none to m_parameter2.
FIXED
>> WebCore/webaudio/BiquadProcessor.cpp:78 >> + m_parameter3 = AudioParam::create("unused", 0.0, 0.0, 1.0); > > Two assignments to m_parameter3 and none to m_parameter2.
FIXED
>> WebCore/webaudio/BiquadProcessor.h:65 >> + AudioParam& parameter3() { return *m_parameter3; } > > Especially since subclasses take the addresses of these references, I think you should return pointers here. You can indicate in the documentation that the BiquadProcessor owns the storage for the parameters.
FIXED
>> WebCore/webaudio/BiquadProcessor.h:70 >> + FilterType m_type; // lowpass, highpass, etc. > > As many of these protected fields should be made private as possible. Also, this comment is unnecessary because the FilterType enum is self-documenting.
All made private.
Kenneth Russell
Comment 6
2010-10-04 16:10:44 PDT
Comment on
attachment 69707
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=69707&action=review
Thanks for addressing the earlier review feedback. One more issue.
> WebCore/webaudio/BiquadProcessor.cpp:51 > + case HighPass2:
Since it sounds like these share the same coefficients and how the biquad processor is set up (for a low-pass vs. high-pass filter) is handled at a lower level, please fold these two switch arms together and consider adding a comment that they share the same parameter values, only differing in type.
Chris Rogers
Comment 7
2010-10-04 16:47:57 PDT
Created
attachment 69720
[details]
Patch
Chris Rogers
Comment 8
2010-10-04 16:48:47 PDT
FIXED last nit
Kenneth Russell
Comment 9
2010-10-04 16:49:40 PDT
Comment on
attachment 69720
[details]
Patch Looks good.
WebKit Commit Bot
Comment 10
2010-10-05 00:59:27 PDT
Comment on
attachment 69720
[details]
Patch Clearing flags on attachment: 69720 Committed
r69091
: <
http://trac.webkit.org/changeset/69091
>
WebKit Commit Bot
Comment 11
2010-10-05 00:59:33 PDT
All reviewed patches have been landed. Closing 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