| 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/AbstractAudioContext.h" | 10 #include "modules/webaudio/AbstractAudioContext.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 129 } |
| 130 | 130 |
| 131 if (m_newChannelCountMode != oldMode) | 131 if (m_newChannelCountMode != oldMode) |
| 132 context()->deferredTaskHandler().addChangedChannelCountMode(this); | 132 context()->deferredTaskHandler().addChangedChannelCountMode(this); |
| 133 } | 133 } |
| 134 | 134 |
| 135 // ---------------------------------------------------------------- | 135 // ---------------------------------------------------------------- |
| 136 | 136 |
| 137 StereoPannerNode::StereoPannerNode(AbstractAudioContext& context, float sampleRa
te) | 137 StereoPannerNode::StereoPannerNode(AbstractAudioContext& context, float sampleRa
te) |
| 138 : AudioNode(context) | 138 : AudioNode(context) |
| 139 , m_pan(AudioParam::create(context, ParamTypeStereoPannerPan, 0)) | 139 , m_pan(AudioParam::create(context, ParamTypeStereoPannerPan, 0, -1, 1)) |
| 140 { | 140 { |
| 141 setHandler(StereoPannerHandler::create(*this, sampleRate, m_pan->handler()))
; | 141 setHandler(StereoPannerHandler::create(*this, sampleRate, m_pan->handler()))
; |
| 142 } | 142 } |
| 143 | 143 |
| 144 StereoPannerNode* StereoPannerNode::create(AbstractAudioContext& context, float
sampleRate) | 144 StereoPannerNode* StereoPannerNode::create(AbstractAudioContext& context, float
sampleRate) |
| 145 { | 145 { |
| 146 return new StereoPannerNode(context, sampleRate); | 146 return new StereoPannerNode(context, sampleRate); |
| 147 } | 147 } |
| 148 | 148 |
| 149 DEFINE_TRACE(StereoPannerNode) | 149 DEFINE_TRACE(StereoPannerNode) |
| 150 { | 150 { |
| 151 visitor->trace(m_pan); | 151 visitor->trace(m_pan); |
| 152 AudioNode::trace(visitor); | 152 AudioNode::trace(visitor); |
| 153 } | 153 } |
| 154 | 154 |
| 155 AudioParam* StereoPannerNode::pan() const | 155 AudioParam* StereoPannerNode::pan() const |
| 156 { | 156 { |
| 157 return m_pan; | 157 return m_pan; |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace blink | 160 } // namespace blink |
| 161 | 161 |
| OLD | NEW |