Index: third_party/WebKit/Source/modules/webaudio/PannerNode.cpp |
diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp |
index 19d96f764d31eb9259e5588101defe8bcd3a5b21..401894300143d4dc4d616a2114230c1e05f532cb 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp |
@@ -72,8 +72,8 @@ PannerHandler::PannerHandler( |
// Node-specific default mixing rules. |
m_channelCount = 2; |
- m_channelCountMode = ClampedMax; |
- m_channelInterpretation = AudioBus::Speakers; |
+ setInternalChannelCountMode(ClampedMax); |
+ setInternalChannelInterpretation(AudioBus::Speakers); |
// Explicitly set the default panning model here so that the histograms |
// include the default value. |
@@ -565,7 +565,7 @@ void PannerHandler::setChannelCount(unsigned long channelCount, ExceptionState& |
if (channelCount > 0 && channelCount <= 2) { |
if (m_channelCount != channelCount) { |
m_channelCount = channelCount; |
- if (m_channelCountMode != Max) |
+ if (internalChannelCountMode() != Max) |
updateChannelsForInputs(); |
} |
} else { |
@@ -586,25 +586,16 @@ void PannerHandler::setChannelCountMode(const String& mode, ExceptionState& exce |
ASSERT(isMainThread()); |
BaseAudioContext::AutoLocker locker(context()); |
- ChannelCountMode oldMode = m_channelCountMode; |
- |
if (mode == "clamped-max") { |
- m_newChannelCountMode = ClampedMax; |
+ setInternalChannelCountMode(ClampedMax); |
} else if (mode == "explicit") { |
- m_newChannelCountMode = Explicit; |
+ setInternalChannelCountMode(Explicit); |
} else if (mode == "max") { |
// This is not supported for a PannerNode, which can only handle 1 or 2 channels. |
exceptionState.throwDOMException( |
NotSupportedError, |
"Panner: 'max' is not allowed"); |
- m_newChannelCountMode = oldMode; |
- } else { |
- // Do nothing for other invalid values. |
- m_newChannelCountMode = oldMode; |
} |
- |
- if (m_newChannelCountMode != oldMode) |
- context()->deferredTaskHandler().addChangedChannelCountMode(this); |
} |
bool PannerHandler::hasSampleAccurateValues() const |