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

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

Issue 1361233004: Implement IIRFilter node for WebAudio. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test issue by printing fewer digits. Created 4 years, 11 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/IIRFilterNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.h b/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.h
new file mode 100644
index 0000000000000000000000000000000000000000..5bfc54203cc4af30227d5e4da5f73df5570efce6
--- /dev/null
+++ b/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.h
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IIRFilterNode_h
+#define IIRFilterNode_h
+
+#include "core/dom/DOMTypedArray.h"
+#include "modules/webaudio/AudioNode.h"
+#include "modules/webaudio/IIRProcessor.h"
+
+namespace blink {
+
+class AbstractAudioContext;
+class ExceptionState;
+
+class IIRFilterNode : public AudioNode {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static IIRFilterNode* create(AbstractAudioContext& context, float sampleRate, const Vector<double> feedforward, const Vector<double> feedback)
+ {
+ return new IIRFilterNode(context, sampleRate, feedforward, feedback);
+ }
+ DECLARE_VIRTUAL_TRACE();
+
+ // 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 DOMFloat32Array* frequencyHz, DOMFloat32Array* magResponse, DOMFloat32Array* phaseResponse, ExceptionState&);
+
+private:
+ IIRFilterNode(AbstractAudioContext&, float sampleRate, const Vector<double> denominator, const Vector<double> numerator);
+
+ IIRProcessor* iirProcessor() const;
+};
+
+}
+
+#endif // IIRFilterNode_h

Powered by Google App Engine
This is Rietveld 408576698