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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.h

Issue 1361233004: Implement IIRFilter node for WebAudio. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix global-interface-listing 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
haraken 2016/01/13 02:42:15 2016
Raymond Toy 2016/01/13 18:30:53 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 IIRDSPKernel_h
6 #define IIRDSPKernel_h
7
8 #include "modules/webaudio/IIRProcessor.h"
9 #include "platform/audio/AudioDSPKernel.h"
10 #include "platform/audio/IIRFilter.h"
11
12 namespace blink {
13
14 class IIRProcessor;
15
16 class IIRDSPKernel final : public AudioDSPKernel {
17 public:
18 explicit IIRDSPKernel(IIRProcessor* processor)
19 : AudioDSPKernel(processor)
20 , m_iir(processor->feedforward(), processor->feedback())
21 {
22 }
23
24 // AudioDSPKernel
25 void process(const float* source, float* dest, size_t framesToProcess) overr ide;
26 void reset() override { m_iir.reset(); }
27
28 // Get the magnitude and phase response of the filter at the given
29 // set of frequencies (in Hz). The phase response is in radians.
30 void getFrequencyResponse(int nFrequencies, const float* frequencyHz, float* magResponse, float* phaseResponse);
31
32 double tailTime() const override;
33 double latencyTime() const override;
34
35 protected:
36 IIRFilter m_iir;
37 };
38
39 } // blink
tkent 2016/01/13 03:28:28 nit: blink -> namespace blink
Raymond Toy 2016/01/13 18:30:53 Done.
40
41 #endif // IIRDSPKernel_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698