From 415ad2bbdcbbbcfeb336717a72b16ee4e8bc5ffb Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Fri, 18 Oct 2019 01:52:39 +0000 Subject: [PATCH] Bug 1499597 - Don't clamp the Q of a BiquadFilterNode when in low-pass and high-pass mode. r=karlt Bug 1265395 implemented the new filter equations from https://github.com/webaudio/web-audio-api/commit/a6842f2f733911a8ac6b330a405eac19878adc15, but missed removing the clamping. Differential Revision: https://phabricator.services.mozilla.com/D49600 --HG-- extra : moz-landing-system : lando --- dom/media/webaudio/blink/Biquad.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/dom/media/webaudio/blink/Biquad.cpp b/dom/media/webaudio/blink/Biquad.cpp index de0f8d81c419..9d0f50628f7d 100644 --- a/dom/media/webaudio/blink/Biquad.cpp +++ b/dom/media/webaudio/blink/Biquad.cpp @@ -104,7 +104,6 @@ void Biquad::setLowpassParams(double cutoff, double resonance) { setNormalizedCoefficients(1, 0, 0, 1, 0, 0); } else if (cutoff > 0) { // Compute biquad coefficients for lowpass filter - resonance = std::max(0.0, resonance); // can't go negative double g = pow(10.0, -0.05 * resonance); double w0 = M_PI * cutoff; double cos_w0 = cos(w0); @@ -134,7 +133,6 @@ void Biquad::setHighpassParams(double cutoff, double resonance) { setNormalizedCoefficients(0, 0, 0, 1, 0, 0); } else if (cutoff > 0) { // Compute biquad coefficients for highpass filter - resonance = std::max(0.0, resonance); // can't go negative double g = pow(10.0, -0.05 * resonance); double w0 = M_PI * cutoff; double cos_w0 = cos(w0);