Skip to content

BiquadFilter gain lower bound can be lower. #2113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rtoy opened this issue Dec 14, 2019 · 0 comments
Closed

BiquadFilter gain lower bound can be lower. #2113

rtoy opened this issue Dec 14, 2019 · 0 comments
Assignees

Comments

@rtoy
Copy link
Member

rtoy commented Dec 14, 2019

In #2087, we changed the lower bound for the gain AudioParam for a BiquadFilterNode. It's about -1541 now. However, any values less than this should just silently underflow to produce a linear gain value of 0, so maybe we should make the lower bound the most negative single float?

@rtoy rtoy self-assigned this Dec 19, 2019
rtoy added a commit to rtoy/web-audio-api that referenced this issue Dec 19, 2019
Since the filter gain is in dB, any finite negative value is fine
since the value should just underflow to a linear gain value of
0. (Unlike the upper bound which would cause overflow if it were
higher.)
pull bot pushed a commit to FreddyZeng/chromium that referenced this issue Jan 17, 2020
The limits for the detune AudioParam have been updated to use the same
limits as OscillatorNode.detune.  The gain AudioParam limits have been
reduced so as not to cause overflow since the gain is in dB.

Tests in audioparam-nominal-range.html updated with new results.  We
also took this opportunity to fix a few minor style issues. (Use
mostPositiveFloat instead of literal value, and add space between
prefix and message for clipped values.

See WebAudio spec issues:
WebAudio/web-audio-api#2113
WebAudio/web-audio-api#2087

Chrome Status: https://www.chromestatus.com/feature/6567195645575168

This CL makes the implementation conform to the spec.

Bug: 1018303
Change-Id: I42c7ec2883fc20dbd59bc6c011ce865159648359
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1968293
Commit-Queue: Raymond Toy <[email protected]>
Reviewed-by: Hongchan Choi <[email protected]>
Cr-Commit-Position: refs/heads/master@{#732643}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant