| 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 3240f4b4512af7440a334c2c99c2e86e1dde47c7..378cac361872c7dd2f3274e419ceaf4213138655 100644
|
| --- a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| @@ -26,10 +26,10 @@
|
| #include "bindings/core/v8/ExceptionState.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/inspector/InstanceCounters.h"
|
| -#include "modules/webaudio/AbstractAudioContext.h"
|
| #include "modules/webaudio/AudioNodeInput.h"
|
| #include "modules/webaudio/AudioNodeOutput.h"
|
| #include "modules/webaudio/AudioParam.h"
|
| +#include "modules/webaudio/BaseAudioContext.h"
|
| #include "wtf/Atomics.h"
|
|
|
| #if DEBUG_AUDIONODE_REFERENCES
|
| @@ -109,7 +109,7 @@ AudioNode* AudioHandler::node() const
|
| return m_node;
|
| }
|
|
|
| -AbstractAudioContext* AudioHandler::context() const
|
| +BaseAudioContext* AudioHandler::context() const
|
| {
|
| return m_context;
|
| }
|
| @@ -207,9 +207,9 @@ unsigned long AudioHandler::channelCount()
|
| void AudioHandler::setChannelCount(unsigned long channelCount, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| - if (channelCount > 0 && channelCount <= AbstractAudioContext::maxNumberOfChannels()) {
|
| + if (channelCount > 0 && channelCount <= BaseAudioContext::maxNumberOfChannels()) {
|
| if (m_channelCount != channelCount) {
|
| m_channelCount = channelCount;
|
| if (m_channelCountMode != Max)
|
| @@ -223,7 +223,7 @@ void AudioHandler::setChannelCount(unsigned long channelCount, ExceptionState& e
|
| channelCount,
|
| 1,
|
| ExceptionMessages::InclusiveBound,
|
| - AbstractAudioContext::maxNumberOfChannels(),
|
| + BaseAudioContext::maxNumberOfChannels(),
|
| ExceptionMessages::InclusiveBound));
|
| }
|
| }
|
| @@ -245,7 +245,7 @@ String AudioHandler::channelCountMode()
|
| void AudioHandler::setChannelCountMode(const String& mode, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| ChannelCountMode oldMode = m_channelCountMode;
|
|
|
| @@ -278,7 +278,7 @@ String AudioHandler::channelInterpretation()
|
| void AudioHandler::setChannelInterpretation(const String& interpretation, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| if (interpretation == "speakers") {
|
| m_channelInterpretation = AudioBus::Speakers;
|
| @@ -389,7 +389,7 @@ void AudioHandler::enableOutputsIfNecessary()
|
| {
|
| if (m_isDisabled && m_connectionRefCount > 0) {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| m_isDisabled = false;
|
| for (auto& output : m_outputs)
|
| @@ -516,7 +516,7 @@ unsigned AudioHandler::numberOfOutputChannels() const
|
| }
|
| // ----------------------------------------------------------------
|
|
|
| -AudioNode::AudioNode(AbstractAudioContext& context)
|
| +AudioNode::AudioNode(BaseAudioContext& context)
|
| : m_context(context)
|
| , m_handler(nullptr)
|
| {
|
| @@ -526,9 +526,9 @@ AudioNode::AudioNode(AbstractAudioContext& context)
|
| void AudioNode::dispose()
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
| handler().dispose();
|
| - if (context()->contextState() == AbstractAudioContext::Running)
|
| + if (context()->contextState() == BaseAudioContext::Running)
|
| context()->deferredTaskHandler().addRenderingOrphanHandler(m_handler.release());
|
| }
|
|
|
| @@ -551,7 +551,7 @@ DEFINE_TRACE(AudioNode)
|
| RefCountedGarbageCollectedEventTargetWithInlineData<AudioNode>::trace(visitor);
|
| }
|
|
|
| -AbstractAudioContext* AudioNode::context() const
|
| +BaseAudioContext* AudioNode::context() const
|
| {
|
| return m_context;
|
| }
|
| @@ -559,7 +559,7 @@ AbstractAudioContext* AudioNode::context() const
|
| AudioNode* AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned inputIndex, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| if (context()->isContextClosed()) {
|
| exceptionState.throwDOMException(
|
| @@ -621,7 +621,7 @@ AudioNode* AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsi
|
| void AudioNode::connect(AudioParam* param, unsigned outputIndex, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| if (context()->isContextClosed()) {
|
| exceptionState.throwDOMException(
|
| @@ -688,7 +688,7 @@ bool AudioNode::disconnectFromOutputIfConnected(unsigned outputIndex, AudioParam
|
| void AudioNode::disconnect()
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| // Disconnect all outgoing connections.
|
| for (unsigned i = 0; i < numberOfOutputs(); ++i)
|
| @@ -698,7 +698,7 @@ void AudioNode::disconnect()
|
| void AudioNode::disconnect(unsigned outputIndex, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| // Sanity check on the output index.
|
| if (outputIndex >= numberOfOutputs()) {
|
| @@ -720,7 +720,7 @@ void AudioNode::disconnect(unsigned outputIndex, ExceptionState& exceptionState)
|
| void AudioNode::disconnect(AudioNode* destination, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| unsigned numberOfDisconnections = 0;
|
|
|
| @@ -745,7 +745,7 @@ void AudioNode::disconnect(AudioNode* destination, ExceptionState& exceptionStat
|
| void AudioNode::disconnect(AudioNode* destination, unsigned outputIndex, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| if (outputIndex >= numberOfOutputs()) {
|
| // The output index is out of range. Throw an exception.
|
| @@ -780,7 +780,7 @@ void AudioNode::disconnect(AudioNode* destination, unsigned outputIndex, Excepti
|
| void AudioNode::disconnect(AudioNode* destination, unsigned outputIndex, unsigned inputIndex, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| if (outputIndex >= numberOfOutputs()) {
|
| exceptionState.throwDOMException(
|
| @@ -820,7 +820,7 @@ void AudioNode::disconnect(AudioNode* destination, unsigned outputIndex, unsigne
|
| void AudioNode::disconnect(AudioParam* destinationParam, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| // The number of disconnection made.
|
| unsigned numberOfDisconnections = 0;
|
| @@ -844,7 +844,7 @@ void AudioNode::disconnect(AudioParam* destinationParam, ExceptionState& excepti
|
| void AudioNode::disconnect(AudioParam* destinationParam, unsigned outputIndex, ExceptionState& exceptionState)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| if (outputIndex >= handler().numberOfOutputs()) {
|
| // The output index is out of range. Throw an exception.
|
| @@ -872,7 +872,7 @@ void AudioNode::disconnect(AudioParam* destinationParam, unsigned outputIndex, E
|
| void AudioNode::disconnectWithoutException(unsigned outputIndex)
|
| {
|
| ASSERT(isMainThread());
|
| - AbstractAudioContext::AutoLocker locker(context());
|
| + BaseAudioContext::AutoLocker locker(context());
|
|
|
| // Sanity check input and output indices.
|
| if (outputIndex >= handler().numberOfOutputs())
|
|
|