OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 11 matching lines...) Expand all Loading... |
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 */ | 23 */ |
24 | 24 |
25 #ifndef WaveShaperNode_h | 25 #ifndef WaveShaperNode_h |
26 #define WaveShaperNode_h | 26 #define WaveShaperNode_h |
27 | 27 |
28 #include "core/dom/DOMTypedArray.h" | 28 #include "core/dom/DOMTypedArray.h" |
29 #include "modules/webaudio/AudioNode.h" | 29 #include "modules/webaudio/AudioNode.h" |
30 #include "modules/webaudio/WaveShaperProcessor.h" | 30 #include "modules/webaudio/WaveShaperProcessor.h" |
31 | 31 |
32 #if ENABLE(WEB_AUDIO) | |
33 | |
34 namespace blink { | 32 namespace blink { |
35 | 33 |
36 class AbstractAudioContext; | 34 class AbstractAudioContext; |
37 class ExceptionState; | 35 class ExceptionState; |
38 | 36 |
39 class WaveShaperNode final : public AudioNode { | 37 class WaveShaperNode final : public AudioNode { |
40 DEFINE_WRAPPERTYPEINFO(); | 38 DEFINE_WRAPPERTYPEINFO(); |
41 public: | 39 public: |
42 static WaveShaperNode* create(AbstractAudioContext& context) | 40 static WaveShaperNode* create(AbstractAudioContext& context) |
43 { | 41 { |
44 return new WaveShaperNode(context); | 42 return new WaveShaperNode(context); |
45 } | 43 } |
46 | 44 |
47 // setCurve() is called on the main thread. | 45 // setCurve() is called on the main thread. |
48 void setCurve(DOMFloat32Array*, ExceptionState&); | 46 void setCurve(DOMFloat32Array*, ExceptionState&); |
49 DOMFloat32Array* curve(); | 47 DOMFloat32Array* curve(); |
50 | 48 |
51 void setOversample(const String&); | 49 void setOversample(const String&); |
52 String oversample() const; | 50 String oversample() const; |
53 | 51 |
54 private: | 52 private: |
55 explicit WaveShaperNode(AbstractAudioContext&); | 53 explicit WaveShaperNode(AbstractAudioContext&); |
56 | 54 |
57 WaveShaperProcessor* waveShaperProcessor() const; | 55 WaveShaperProcessor* waveShaperProcessor() const; |
58 }; | 56 }; |
59 | 57 |
60 } // namespace blink | 58 } // namespace blink |
61 | 59 |
62 #endif // ENABLE(WEB_AUDIO) | |
63 | |
64 #endif // WaveShaperNode_h | 60 #endif // WaveShaperNode_h |
OLD | NEW |