Add methods to compute magnitude and phase response for biquads
[WebKit-https.git] / Source / WebCore / webaudio / BiquadProcessor.h
index 16ef405de2c4457f3a14cddc5115c39c17505c9f..c7f7d3068a3cf5de5c824131913bcf6459237986 100644 (file)
@@ -60,6 +60,15 @@ public:
         
     virtual void process(AudioBus* source, AudioBus* destination, size_t framesToProcess);
 
+    // Get the magnitude and phase response of the filter at the given
+    // set of frequencies (in Hz). The phase response is in radians.
+    void getFrequencyResponse(int nFrequencies,
+                              const float* frequencyHz,
+                              float* magResponse,
+                              float* phaseResponse);
+
+    void checkForDirtyCoefficients();
+    
     bool filterCoefficientsDirty() const { return m_filterCoefficientsDirty; }
 
     AudioParam* parameter1() { return m_parameter1.get(); }