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

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

Issue 1803153002: Add min/max values for AudioParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 7 months 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
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/AbstractAudioContext.h" 10 #include "modules/webaudio/AbstractAudioContext.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698