Commit ff1eda67 authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

Revert "Remove Dezippering from BiquadFilter"

This reverts commit 53b1b7da.

Reason for revert: The new test webaudio/BiquadFilter/no-dezippering.html is failing under Mac 10.10.

Original change's description:
> Remove Dezippering from BiquadFilter
> 
> Remove dezippering from all of the attributes.  The value will now 
> change immediately instead of gradually changing from the old value
> to the new value.
> 
> Chromium Feature: https://www.chromestatus.com/features/5287995770929152
> Intent to ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/YKYRrh0nWMo/aGzd3049AgAJ
> 
> Bug: 752986
> Test: BiquadFilter/dezipper.html
> Change-Id: I86840159709158fd52a69a7c3c5f279267277d44
> Reviewed-on: https://chromium-review.googlesource.com/612104
> Commit-Queue: Raymond Toy <rtoy@chromium.org>
> Reviewed-by: Hongchan Choi <hongchan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#532910}

TBR=rtoy@chromium.org,hongchan@chromium.org

Change-Id: I30c98f8aad3c8a1f7df22e55912a4f86d94d7dfa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 752986
Reviewed-on: https://chromium-review.googlesource.com/893531Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532957}
parent b424a592
......@@ -52,10 +52,10 @@ void BiquadDSPKernel::UpdateCoefficientsIfNecessary(int frames_to_process) {
detune, frames_to_process);
UpdateCoefficients(frames_to_process, cutoff_frequency, q, gain, detune);
} else {
cutoff_frequency[0] = GetBiquadProcessor()->Parameter1().Value();
q[0] = GetBiquadProcessor()->Parameter2().Value();
gain[0] = GetBiquadProcessor()->Parameter3().Value();
detune[0] = GetBiquadProcessor()->Parameter4().Value();
cutoff_frequency[0] = GetBiquadProcessor()->Parameter1().SmoothedValue();
q[0] = GetBiquadProcessor()->Parameter2().SmoothedValue();
gain[0] = GetBiquadProcessor()->Parameter3().SmoothedValue();
detune[0] = GetBiquadProcessor()->Parameter4().SmoothedValue();
UpdateCoefficients(1, cutoff_frequency, q, gain, detune);
}
}
......
......@@ -80,16 +80,6 @@ void BiquadProcessor::CheckForDirtyCoefficients() {
filter_coefficients_dirty_ = true;
has_just_reset_ = false;
} else {
// TODO(crbug.com/763994): With dezippering removed, we don't want to use
// these methods. We need to implement another way of noticing if one of
// the parameters has changed. We do this as an optimization because
// computing the filter coefficients from these parameters is fairly
// expensive. NB: The calls to Smooth() don't actually cause the
// coefficients to be dezippered. This is just a way to notice that the
// coefficient values have changed. |UpdateCoefficientsIfNecessary()|
// checks to see if the filter coefficients are dirty and sets the filter
// to the new value, without smoothing.
//
// Smooth all of the filter parameters. If they haven't yet converged to
// their target value then mark coefficients as dirty.
bool is_stable1 = parameter1_->Smooth();
......
......@@ -840,16 +840,7 @@ double Biquad::TailFrame(int coef_index, double max_frame) {
DCHECK(std::isfinite(c2));
tail_frame = 1 + log(kMaxTailAmplitude / (c1 + c2)) / log(r);
if (c1 == 0 && c2 == 0) {
// If c1 = c2 = 0, then H(z) = b0. Hence, there's no tail
// because this is just a wire from input to output.
tail_frame = 0;
} else {
// Otherwise, check that the tail has finite length. Not
// strictly necessary, but we want to know if this ever
// happens.
DCHECK(std::isfinite(tail_frame));
}
DCHECK(std::isfinite(tail_frame));
}
} else {
// Repeated roots. This should be pretty rare because all the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment