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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } else { | 68 } else { |
69 m_stereoPanner->panToTargetValue(inputBus, outputBus, m_pan->value(), fr
amesToProcess); | 69 m_stereoPanner->panToTargetValue(inputBus, outputBus, m_pan->value(), fr
amesToProcess); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 void StereoPannerHandler::initialize() | 73 void StereoPannerHandler::initialize() |
74 { | 74 { |
75 if (isInitialized()) | 75 if (isInitialized()) |
76 return; | 76 return; |
77 | 77 |
78 m_stereoPanner = Spatializer::create(Spatializer::PanningModelEqualPower, sa
mpleRate()); | 78 m_stereoPanner = StereoPanner::create(sampleRate()); |
79 | 79 |
80 AudioHandler::initialize(); | 80 AudioHandler::initialize(); |
81 } | 81 } |
82 | 82 |
83 void StereoPannerHandler::setChannelCount(unsigned long channelCount, ExceptionS
tate& exceptionState) | 83 void StereoPannerHandler::setChannelCount(unsigned long channelCount, ExceptionS
tate& exceptionState) |
84 { | 84 { |
85 DCHECK(isMainThread()); | 85 DCHECK(isMainThread()); |
86 BaseAudioContext::AutoLocker locker(context()); | 86 BaseAudioContext::AutoLocker locker(context()); |
87 | 87 |
88 // A PannerNode only supports 1 or 2 channels | 88 // A PannerNode only supports 1 or 2 channels |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 AudioNode::trace(visitor); | 150 AudioNode::trace(visitor); |
151 } | 151 } |
152 | 152 |
153 AudioParam* StereoPannerNode::pan() const | 153 AudioParam* StereoPannerNode::pan() const |
154 { | 154 { |
155 return m_pan; | 155 return m_pan; |
156 } | 156 } |
157 | 157 |
158 } // namespace blink | 158 } // namespace blink |
159 | 159 |
OLD | NEW |