Bug 215381 - Fix BiquadFilterNode's lowpass filter
Summary: Fix BiquadFilterNode's lowpass filter
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:
Blocks: 212611
  Show dependency treegraph
 
Reported: 2020-08-11 10:16 PDT by Chris Dumez
Modified: 2020-08-12 14:18 PDT (History)
9 users (show)

See Also:


Attachments
Patch (5.85 KB, patch)
2020-08-11 10:19 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (9.21 KB, patch)
2020-08-11 12:50 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (11.80 KB, patch)
2020-08-11 13:26 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-11 10:16:14 PDT
Fix BiquadFilterNode's lowpass filter.
Comment 1 Chris Dumez 2020-08-11 10:19:37 PDT
Created attachment 406389 [details]
Patch
Comment 2 Chris Dumez 2020-08-11 12:50:13 PDT
Created attachment 406406 [details]
Patch
Comment 3 Darin Adler 2020-08-11 12:57:30 PDT
Comment on attachment 406406 [details]
Patch

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

> Source/WebCore/Modules/webaudio/BiquadProcessor.cpp:41
> +    , m_parameter2(AudioParam::create(context, "Q", 1, -FLT_MAX, FLT_MAX))
> +    , m_parameter3(AudioParam::create(context, "gain", 0.0, -FLT_MAX, 1541))
> +    , m_parameter4(AudioParam::create(context, "detune", 0.0, -153600, 153600))

What tests these?

> LayoutTests/webaudio/biquad-lowpass.html:18
> +window.OfflineAudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext;

Not sure why we need this. What happens if we leave this line of code out?
Comment 4 Chris Dumez 2020-08-11 13:02:29 PDT
(In reply to Darin Adler from comment #3)
> Comment on attachment 406406 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=406406&action=review
> 
> > Source/WebCore/Modules/webaudio/BiquadProcessor.cpp:41
> > +    , m_parameter2(AudioParam::create(context, "Q", 1, -FLT_MAX, FLT_MAX))
> > +    , m_parameter3(AudioParam::create(context, "gain", 0.0, -FLT_MAX, 1541))
> > +    , m_parameter4(AudioParam::create(context, "detune", 0.0, -153600, 153600))
> 
> What tests these?

I will check. I may need to add coverage.

> 
> > LayoutTests/webaudio/biquad-lowpass.html:18
> > +window.OfflineAudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext;
> 
> Not sure why we need this. What happens if we leave this line of code out?

Without this change we are unable to run the test in other browsers. I wanted to compare the behavior in major browsers and had to make this change locally. I figured we may as well land it.
Comment 5 Chris Dumez 2020-08-11 13:26:30 PDT
Created attachment 406412 [details]
Patch
Comment 6 Chris Dumez 2020-08-11 13:27:40 PDT
(In reply to Darin Adler from comment #3)
> Comment on attachment 406406 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=406406&action=review
> 
> > Source/WebCore/Modules/webaudio/BiquadProcessor.cpp:41
> > +    , m_parameter2(AudioParam::create(context, "Q", 1, -FLT_MAX, FLT_MAX))
> > +    , m_parameter3(AudioParam::create(context, "gain", 0.0, -FLT_MAX, 1541))
> > +    , m_parameter4(AudioParam::create(context, "detune", 0.0, -153600, 153600))
> 
> What tests these?

I added a test.

> 
> > LayoutTests/webaudio/biquad-lowpass.html:18
> > +window.OfflineAudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext;
> 
> Not sure why we need this. What happens if we leave this line of code out?

Nothing, in WebKit. This is only for other browsers.
Comment 7 EWS 2020-08-11 14:18:31 PDT
Committed r265517: <https://trac.webkit.org/changeset/265517>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 406412 [details].
Comment 8 Radar WebKit Bug Importer 2020-08-11 14:19:42 PDT
<rdar://problem/66861880>