Add methods to compute magnitude and phase response for biquads
[WebKit-https.git] / Source / WebCore / webaudio / BiquadFilterNode.h
index 683b2a39d474f83eecd6b5652c421ee680b57793..545b060beee6a1998448fbcb38b83bf0272d6967 100644 (file)
@@ -57,7 +57,12 @@ public:
     AudioParam* frequency() { return biquadProcessor()->parameter1(); }
     AudioParam* q() { return biquadProcessor()->parameter2(); }
     AudioParam* gain() { return biquadProcessor()->parameter3(); }
-    
+
+    // 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(const Float32Array* frequencyHz,
+                              Float32Array* magResponse,
+                              Float32Array* phaseResponse);
 private:
     BiquadFilterNode(AudioContext*, float sampleRate);