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

Unified Diff: Source/modules/webaudio/ScriptProcessorNode.cpp

Issue 1214463003: Split "Online" and "Offline" AudioContext processing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring to ToT Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webaudio/ScriptProcessorNode.h ('k') | Source/modules/webaudio/ScriptProcessorNodeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/ScriptProcessorNode.cpp
diff --git a/Source/modules/webaudio/ScriptProcessorNode.cpp b/Source/modules/webaudio/ScriptProcessorNode.cpp
index d8b5a56fec36960ff52a0c4c6ae46fbc7cb94ee0..0d3cb804a9bdfd79478c84f932699b284e9a0d34 100644
--- a/Source/modules/webaudio/ScriptProcessorNode.cpp
+++ b/Source/modules/webaudio/ScriptProcessorNode.cpp
@@ -30,8 +30,8 @@
#include "core/dom/CrossThreadTask.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
+#include "modules/webaudio/AbstractAudioContext.h"
#include "modules/webaudio/AudioBuffer.h"
-#include "modules/webaudio/AudioContext.h"
#include "modules/webaudio/AudioNodeInput.h"
#include "modules/webaudio/AudioNodeOutput.h"
#include "modules/webaudio/AudioProcessingEvent.h"
@@ -53,7 +53,7 @@ ScriptProcessorHandler::ScriptProcessorHandler(AudioNode& node, float sampleRate
if (m_bufferSize < ProcessingSizeInFrames)
m_bufferSize = ProcessingSizeInFrames;
- ASSERT(numberOfInputChannels <= AudioContext::maxNumberOfChannels());
+ ASSERT(numberOfInputChannels <= AbstractAudioContext::maxNumberOfChannels());
addInput();
addOutput(numberOfOutputChannels);
@@ -217,7 +217,7 @@ double ScriptProcessorHandler::latencyTime() const
void ScriptProcessorHandler::setChannelCount(unsigned long channelCount, ExceptionState& exceptionState)
{
ASSERT(isMainThread());
- AudioContext::AutoLocker locker(context());
+ AbstractAudioContext::AutoLocker locker(context());
if (channelCount != m_channelCount) {
exceptionState.throwDOMException(
@@ -229,7 +229,7 @@ void ScriptProcessorHandler::setChannelCount(unsigned long channelCount, Excepti
void ScriptProcessorHandler::setChannelCountMode(const String& mode, ExceptionState& exceptionState)
{
ASSERT(isMainThread());
- AudioContext::AutoLocker locker(context());
+ AbstractAudioContext::AutoLocker locker(context());
if ((mode == "max") || (mode == "clamped-max")) {
exceptionState.throwDOMException(
@@ -240,7 +240,7 @@ void ScriptProcessorHandler::setChannelCountMode(const String& mode, ExceptionSt
// ----------------------------------------------------------------
-ScriptProcessorNode::ScriptProcessorNode(AudioContext& context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
+ScriptProcessorNode::ScriptProcessorNode(AbstractAudioContext& context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
: AudioNode(context)
{
setHandler(ScriptProcessorHandler::create(*this, sampleRate, bufferSize, numberOfInputChannels, numberOfOutputChannels));
@@ -262,7 +262,7 @@ static size_t chooseBufferSize()
return bufferSize;
}
-ScriptProcessorNode* ScriptProcessorNode::create(AudioContext& context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
+ScriptProcessorNode* ScriptProcessorNode::create(AbstractAudioContext& context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
{
// Check for valid buffer size.
switch (bufferSize) {
@@ -284,10 +284,10 @@ ScriptProcessorNode* ScriptProcessorNode::create(AudioContext& context, float sa
if (!numberOfInputChannels && !numberOfOutputChannels)
return nullptr;
- if (numberOfInputChannels > AudioContext::maxNumberOfChannels())
+ if (numberOfInputChannels > AbstractAudioContext::maxNumberOfChannels())
return nullptr;
- if (numberOfOutputChannels > AudioContext::maxNumberOfChannels())
+ if (numberOfOutputChannels > AbstractAudioContext::maxNumberOfChannels())
return nullptr;
return new ScriptProcessorNode(context, sampleRate, bufferSize, numberOfInputChannels, numberOfOutputChannels);
« no previous file with comments | « Source/modules/webaudio/ScriptProcessorNode.h ('k') | Source/modules/webaudio/ScriptProcessorNodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698