OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
tkent
2016/01/13 03:28:28
2016
Raymond Toy
2016/01/13 18:30:54
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef IIRProcessor_h | |
6 #define IIRProcessor_h | |
7 | |
8 #include "modules/webaudio/AudioNode.h" | |
9 #include "platform/audio/AudioDSPKernel.h" | |
10 #include "platform/audio/AudioDSPKernelProcessor.h" | |
11 #include "platform/audio/IIRFilter.h" | |
12 | |
13 namespace blink { | |
14 | |
15 class IIRDSPKernel; | |
16 | |
17 class IIRProcessor final : public AudioDSPKernelProcessor { | |
18 public: | |
19 IIRProcessor(float sampleRate, size_t numberOfChannels, | |
20 const Vector<double>& feedforwardCoef, const Vector<double>& feedbackCoe f); | |
21 ~IIRProcessor() override; | |
22 | |
23 PassOwnPtr<AudioDSPKernel> createKernel() override; | |
24 | |
25 void process(const AudioBus* source, AudioBus* destination, size_t framesToP rocess) override; | |
26 | |
27 // Get the magnitude and phase response of the filter at the given | |
28 // set of frequencies (in Hz). The phase response is in radians. | |
29 void getFrequencyResponse(int nFrequencies, const float* frequencyHz, float* magResponse, float* phaseResponse); | |
30 | |
31 AudioDoubleArray* feedback() { return &m_feedback; } | |
32 AudioDoubleArray* feedforward() { return &m_feedforward; } | |
33 private: | |
tkent
2016/01/13 03:28:28
nit: Add a blank line before |private:|.
Raymond Toy
2016/01/13 18:30:53
Done.
| |
34 // The feedback and feedforward filter coefficients for the IIR filter. | |
35 AudioDoubleArray m_feedback; | |
36 AudioDoubleArray m_feedforward; | |
37 // This holds the IIR kernel for computing the frequency response. | |
38 OwnPtr<IIRDSPKernel> m_responseKernel; | |
39 }; | |
40 | |
41 } // blink | |
tkent
2016/01/13 03:28:28
nit: blink -> namespace blink
Raymond Toy
2016/01/13 18:30:53
Done.
| |
42 | |
43 #endif // IIRProcessor_h | |
OLD | NEW |