| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IIRFilterNode_h | 5 #ifndef IIRFilterNode_h |
| 6 #define IIRFilterNode_h | 6 #define IIRFilterNode_h |
| 7 | 7 |
| 8 #include "core/dom/DOMTypedArray.h" | 8 #include "core/dom/DOMTypedArray.h" |
| 9 #include "modules/webaudio/AudioNode.h" | 9 #include "modules/webaudio/AudioNode.h" |
| 10 #include "modules/webaudio/IIRProcessor.h" | 10 #include "modules/webaudio/IIRProcessor.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class BaseAudioContext; | 14 class BaseAudioContext; |
| 15 class ExceptionState; | 15 class ExceptionState; |
| 16 class IIRFilterOptions; |
| 16 | 17 |
| 17 class IIRFilterNode : public AudioNode { | 18 class IIRFilterNode : public AudioNode { |
| 18 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
| 19 public: | 20 public: |
| 20 static IIRFilterNode* create( | 21 static IIRFilterNode* create( |
| 21 BaseAudioContext&, | 22 BaseAudioContext&, |
| 22 const Vector<double> feedforward, | 23 const Vector<double> feedforward, |
| 23 const Vector<double> feedback, | 24 const Vector<double> feedback, |
| 24 ExceptionState&); | 25 ExceptionState&); |
| 25 | 26 |
| 27 static IIRFilterNode* create(BaseAudioContext*, const IIRFilterOptions&, Exc
eptionState&); |
| 28 |
| 26 DECLARE_VIRTUAL_TRACE(); | 29 DECLARE_VIRTUAL_TRACE(); |
| 27 | 30 |
| 28 // Get the magnitude and phase response of the filter at the given | 31 // Get the magnitude and phase response of the filter at the given |
| 29 // set of frequencies (in Hz). The phase response is in radians. | 32 // set of frequencies (in Hz). The phase response is in radians. |
| 30 void getFrequencyResponse(const DOMFloat32Array* frequencyHz, DOMFloat32Arra
y* magResponse, DOMFloat32Array* phaseResponse, ExceptionState&); | 33 void getFrequencyResponse(const DOMFloat32Array* frequencyHz, DOMFloat32Arra
y* magResponse, DOMFloat32Array* phaseResponse, ExceptionState&); |
| 31 | 34 |
| 32 private: | 35 private: |
| 33 IIRFilterNode(BaseAudioContext&, const Vector<double> denominator, const Vec
tor<double> numerator); | 36 IIRFilterNode(BaseAudioContext&, const Vector<double> denominator, const Vec
tor<double> numerator); |
| 34 | 37 |
| 35 IIRProcessor* iirProcessor() const; | 38 IIRProcessor* iirProcessor() const; |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 } // namespace blink | 41 } // namespace blink |
| 39 | 42 |
| 40 #endif // IIRFilterNode_h | 43 #endif // IIRFilterNode_h |
| OLD | NEW |