| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 StereoPannerNode* StereoPannerNode::Create(BaseAudioContext* context, | 161 StereoPannerNode* StereoPannerNode::Create(BaseAudioContext* context, |
| 162 const StereoPannerOptions& options, | 162 const StereoPannerOptions& options, |
| 163 ExceptionState& exception_state) { | 163 ExceptionState& exception_state) { |
| 164 StereoPannerNode* node = Create(*context, exception_state); | 164 StereoPannerNode* node = Create(*context, exception_state); |
| 165 | 165 |
| 166 if (!node) | 166 if (!node) |
| 167 return nullptr; | 167 return nullptr; |
| 168 | 168 |
| 169 node->HandleChannelOptions(options, exception_state); | 169 node->HandleChannelOptions(options, exception_state); |
| 170 | 170 |
| 171 if (options.hasPan()) | 171 node->pan()->setValue(options.pan()); |
| 172 node->pan()->setValue(options.pan()); | |
| 173 | 172 |
| 174 return node; | 173 return node; |
| 175 } | 174 } |
| 176 | 175 |
| 177 DEFINE_TRACE(StereoPannerNode) { | 176 DEFINE_TRACE(StereoPannerNode) { |
| 178 visitor->Trace(pan_); | 177 visitor->Trace(pan_); |
| 179 AudioNode::Trace(visitor); | 178 AudioNode::Trace(visitor); |
| 180 } | 179 } |
| 181 | 180 |
| 182 AudioParam* StereoPannerNode::pan() const { | 181 AudioParam* StereoPannerNode::pan() const { |
| 183 return pan_; | 182 return pan_; |
| 184 } | 183 } |
| 185 | 184 |
| 186 } // namespace blink | 185 } // namespace blink |
| OLD | NEW |