| Index: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
|
| index e5042117c0f7b54b8b426113049dcd9a7cc06840..e0501cd6820662207732e3e95546c768f5a9b7fc 100644
|
| --- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
|
| +++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
|
| @@ -24,6 +24,8 @@
|
|
|
| #include "modules/webaudio/OfflineAudioDestinationNode.h"
|
|
|
| +#include "core/dom/ExceptionCode.h"
|
| +#include "core/dom/ExecutionContext.h"
|
| #include "core/dom/ExecutionContextTask.h"
|
| #include "modules/webaudio/AudioNodeInput.h"
|
| #include "modules/webaudio/AudioNodeOutput.h"
|
| @@ -313,6 +315,40 @@ bool OfflineAudioDestinationHandler::renderIfNotSuspended(AudioBus* sourceBus, A
|
| return false;
|
| }
|
|
|
| +void OfflineAudioDestinationHandler::setChannelCount(unsigned long newChannelCount, ExceptionState& exceptionState)
|
| +{
|
| + DCHECK(isMainThread());
|
| + BaseAudioContext::AutoLocker locker(context());
|
| +
|
| + // Cannot change the channelCount to a different value.
|
| + if (newChannelCount != channelCount()) {
|
| + exceptionState.throwDOMException(
|
| + NotSupportedError,
|
| + ExceptionMessages::indexOutsideRange<unsigned long>(
|
| + "channelCount",
|
| + newChannelCount,
|
| + channelCount(),
|
| + ExceptionMessages::InclusiveBound,
|
| + channelCount(),
|
| + ExceptionMessages::InclusiveBound));
|
| + }
|
| +}
|
| +
|
| +void OfflineAudioDestinationHandler::setChannelCountMode(const String& mode, ExceptionState& exceptionState)
|
| +{
|
| + DCHECK(isMainThread());
|
| + BaseAudioContext::AutoLocker locker(context());
|
| +
|
| + if (mode != channelCountMode()) {
|
| + exceptionState.throwDOMException(
|
| + NotSupportedError,
|
| + "Cannot change channelCountMode from \""
|
| + + channelCountMode()
|
| + + "\" to \""
|
| + + mode + "\"");
|
| + }
|
| +}
|
| +
|
| // ----------------------------------------------------------------
|
|
|
| OfflineAudioDestinationNode::OfflineAudioDestinationNode(BaseAudioContext& context, AudioBuffer* renderTarget)
|
|
|