Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/StereoPannerNode.cpp

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Add baseLatency and fix use of hardwareSampleRate. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::initialize() { 77 void StereoPannerHandler::initialize() {
78 if (isInitialized()) 78 if (isInitialized())
79 return; 79 return;
80 80
81 m_stereoPanner = StereoPanner::create(sampleRate()); 81 m_stereoPanner = StereoPanner::create(context()->sampleRate());
82 82
83 AudioHandler::initialize(); 83 AudioHandler::initialize();
84 } 84 }
85 85
86 void StereoPannerHandler::setChannelCount(unsigned long channelCount, 86 void StereoPannerHandler::setChannelCount(unsigned long channelCount,
87 ExceptionState& exceptionState) { 87 ExceptionState& exceptionState) {
88 DCHECK(isMainThread()); 88 DCHECK(isMainThread());
89 BaseAudioContext::AutoLocker locker(context()); 89 BaseAudioContext::AutoLocker locker(context());
90 90
91 // A PannerNode only supports 1 or 2 channels 91 // A PannerNode only supports 1 or 2 channels
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 DEFINE_TRACE(StereoPannerNode) { 170 DEFINE_TRACE(StereoPannerNode) {
171 visitor->trace(m_pan); 171 visitor->trace(m_pan);
172 AudioNode::trace(visitor); 172 AudioNode::trace(visitor);
173 } 173 }
174 174
175 AudioParam* StereoPannerNode::pan() const { 175 AudioParam* StereoPannerNode::pan() const {
176 return m_pan; 176 return m_pan;
177 } 177 }
178 178
179 } // namespace blink 179 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698