OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 StereoPannerNode_h | 5 #ifndef StereoPannerNode_h |
6 #define StereoPannerNode_h | 6 #define StereoPannerNode_h |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "modules/webaudio/AudioNode.h" | 9 #include "modules/webaudio/AudioNode.h" |
10 #include "modules/webaudio/AudioParam.h" | 10 #include "modules/webaudio/AudioParam.h" |
11 #include "platform/audio/AudioBus.h" | 11 #include "platform/audio/AudioBus.h" |
12 #include "platform/audio/StereoPanner.h" | 12 #include "platform/audio/StereoPanner.h" |
13 #include <memory> | 13 #include <memory> |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class BaseAudioContext; | 17 class BaseAudioContext; |
18 class StereoPannerOptions; | 18 class StereoPannerOptions; |
19 | 19 |
20 // StereoPannerNode is an AudioNode with one input and one output. It is | 20 // StereoPannerNode is an AudioNode with one input and one output. It is |
21 // specifically designed for equal-power stereo panning. | 21 // specifically designed for equal-power stereo panning. |
22 class StereoPannerHandler final : public AudioHandler { | 22 class StereoPannerHandler final : public AudioHandler { |
23 public: | 23 public: |
24 static PassRefPtr<StereoPannerHandler> create(AudioNode&, | 24 static PassRefPtr<StereoPannerHandler> create(AudioNode&, |
25 float sampleRate, | 25 float sampleRate, |
26 AudioParamHandler& pan); | 26 AudioParamHandler& pan); |
27 ~StereoPannerHandler() override; | 27 ~StereoPannerHandler() override; |
28 | 28 |
29 void process(size_t framesToProcess) override; | 29 void process(size_t framesToProcess) override; |
| 30 void processOnlyAudioParams(size_t framesToProcess) override; |
30 void initialize() override; | 31 void initialize() override; |
31 | 32 |
32 void setChannelCount(unsigned long, ExceptionState&) final; | 33 void setChannelCount(unsigned long, ExceptionState&) final; |
33 void setChannelCountMode(const String&, ExceptionState&) final; | 34 void setChannelCountMode(const String&, ExceptionState&) final; |
34 | 35 |
35 private: | 36 private: |
36 StereoPannerHandler(AudioNode&, float sampleRate, AudioParamHandler& pan); | 37 StereoPannerHandler(AudioNode&, float sampleRate, AudioParamHandler& pan); |
37 | 38 |
38 std::unique_ptr<StereoPanner> m_stereoPanner; | 39 std::unique_ptr<StereoPanner> m_stereoPanner; |
39 RefPtr<AudioParamHandler> m_pan; | 40 RefPtr<AudioParamHandler> m_pan; |
(...skipping 17 matching lines...) Expand all Loading... |
57 | 58 |
58 private: | 59 private: |
59 StereoPannerNode(BaseAudioContext&); | 60 StereoPannerNode(BaseAudioContext&); |
60 | 61 |
61 Member<AudioParam> m_pan; | 62 Member<AudioParam> m_pan; |
62 }; | 63 }; |
63 | 64 |
64 } // namespace blink | 65 } // namespace blink |
65 | 66 |
66 #endif // StereoPannerNode_h | 67 #endif // StereoPannerNode_h |
OLD | NEW |