Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h

Issue 2862373002: Compute tail time from Biquad coefficients (Closed)
Patch Set: Initialize tail_time_ in constructor Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h
diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h
index efeb3eb027572dabb1bc7e0171297ad860dbce1a..915bf2e5677eae34e62f196dc435f7c77c519c64 100644
--- a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h
+++ b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h
@@ -40,7 +40,8 @@ class BiquadProcessor;
class BiquadDSPKernel final : public AudioDSPKernel {
public:
explicit BiquadDSPKernel(BiquadProcessor* processor)
- : AudioDSPKernel(processor) {}
+ : AudioDSPKernel(processor),
+ tail_time_(std::numeric_limits<double>::infinity()) {}
// AudioDSPKernel
void Process(const float* source,
@@ -75,8 +76,15 @@ class BiquadDSPKernel final : public AudioDSPKernel {
const float* detune);
private:
+ // Compute the tail time using the BiquadFilter coefficients at
+ // index |coef_index|.
+ void UpdateTailTime(int coef_index);
+
// Synchronize process() with getting and setting the filter coefficients.
mutable Mutex process_lock_;
+
+ // The current tail time for biquad filter.
+ double tail_time_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698