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 #include "modules/webaudio/StereoPannerNode.h" | 5 #include "modules/webaudio/StereoPannerNode.h" |
6 #include "bindings/core/v8/ExceptionMessages.h" | 6 #include "bindings/core/v8/ExceptionMessages.h" |
7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
10 #include "modules/webaudio/AudioNodeInput.h" | 10 #include "modules/webaudio/AudioNodeInput.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 m_pan->calculateSampleAccurateValues(panValues, framesToProcess); | 67 m_pan->calculateSampleAccurateValues(panValues, framesToProcess); |
68 m_stereoPanner->panWithSampleAccurateValues(inputBus, outputBus, | 68 m_stereoPanner->panWithSampleAccurateValues(inputBus, outputBus, |
69 panValues, framesToProcess); | 69 panValues, framesToProcess); |
70 } | 70 } |
71 } else { | 71 } else { |
72 m_stereoPanner->panToTargetValue(inputBus, outputBus, m_pan->value(), | 72 m_stereoPanner->panToTargetValue(inputBus, outputBus, m_pan->value(), |
73 framesToProcess); | 73 framesToProcess); |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
| 77 void StereoPannerHandler::processOnlyAudioParams(size_t framesToProcess) { |
| 78 float values[AudioUtilities::kRenderQuantumFrames]; |
| 79 DCHECK_LE(framesToProcess, AudioUtilities::kRenderQuantumFrames); |
| 80 |
| 81 m_pan->calculateSampleAccurateValues(values, framesToProcess); |
| 82 } |
| 83 |
77 void StereoPannerHandler::initialize() { | 84 void StereoPannerHandler::initialize() { |
78 if (isInitialized()) | 85 if (isInitialized()) |
79 return; | 86 return; |
80 | 87 |
81 m_stereoPanner = StereoPanner::create(sampleRate()); | 88 m_stereoPanner = StereoPanner::create(sampleRate()); |
82 | 89 |
83 AudioHandler::initialize(); | 90 AudioHandler::initialize(); |
84 } | 91 } |
85 | 92 |
86 void StereoPannerHandler::setChannelCount(unsigned long channelCount, | 93 void StereoPannerHandler::setChannelCount(unsigned long channelCount, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 DEFINE_TRACE(StereoPannerNode) { | 177 DEFINE_TRACE(StereoPannerNode) { |
171 visitor->trace(m_pan); | 178 visitor->trace(m_pan); |
172 AudioNode::trace(visitor); | 179 AudioNode::trace(visitor); |
173 } | 180 } |
174 | 181 |
175 AudioParam* StereoPannerNode::pan() const { | 182 AudioParam* StereoPannerNode::pan() const { |
176 return m_pan; | 183 return m_pan; |
177 } | 184 } |
178 | 185 |
179 } // namespace blink | 186 } // namespace blink |
OLD | NEW |