| Index: third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| index 0e2320464e1b59c949d2bde59063b9e4e3f17f1f..bc6ccd61fe8dff82812cb360b1ded537322e0111 100644
|
| --- a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| @@ -97,6 +97,7 @@ void AudioHandler::dispose()
|
| ASSERT(context()->isGraphOwner());
|
|
|
| context()->deferredTaskHandler().removeChangedChannelCountMode(this);
|
| + context()->deferredTaskHandler().removeChangedChannelInterpretation(this);
|
| context()->deferredTaskHandler().removeAutomaticPullNode(this);
|
| for (auto& output : m_outputs)
|
| output->dispose();
|
| @@ -280,13 +281,18 @@ void AudioHandler::setChannelInterpretation(const String& interpretation, Except
|
| ASSERT(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| + AudioBus::ChannelInterpretation oldMode = m_channelInterpretation;
|
| +
|
| if (interpretation == "speakers") {
|
| - m_channelInterpretation = AudioBus::Speakers;
|
| + m_newChannelInterpretation = AudioBus::Speakers;
|
| } else if (interpretation == "discrete") {
|
| - m_channelInterpretation = AudioBus::Discrete;
|
| + m_newChannelInterpretation = AudioBus::Discrete;
|
| } else {
|
| ASSERT_NOT_REACHED();
|
| }
|
| +
|
| + if (m_newChannelInterpretation != oldMode)
|
| + context()->deferredTaskHandler().addChangedChannelInterpretation(this);
|
| }
|
|
|
| void AudioHandler::updateChannelsForInputs()
|
| @@ -506,6 +512,11 @@ void AudioHandler::updateChannelCountMode()
|
| updateChannelsForInputs();
|
| }
|
|
|
| +void AudioHandler::updateChannelInterpretation()
|
| +{
|
| + m_channelInterpretation = m_newChannelInterpretation;
|
| +}
|
| +
|
| unsigned AudioHandler::numberOfOutputChannels() const
|
| {
|
| // This should only be called for ScriptProcessorNodes which are the only nodes where you can
|
|
|