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

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

Issue 2102133002: Add constructors for WebAudio nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and prefix use counter names with WebAudio Created 4 years, 3 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698