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

Unified Diff: Source/modules/webaudio/ConvolverNode.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/ConvolverNode.h ('k') | Source/modules/webaudio/ConvolverNodeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/ConvolverNode.cpp
diff --git a/Source/modules/webaudio/ConvolverNode.cpp b/Source/modules/webaudio/ConvolverNode.cpp
index eb5188bc3a54d4f7fd0313d465c0cd4a2b2f8a79..392f5d64fff9d52d965decf113cd12c5a65616f0 100644
--- a/Source/modules/webaudio/ConvolverNode.cpp
+++ b/Source/modules/webaudio/ConvolverNode.cpp
@@ -29,7 +29,6 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "modules/webaudio/AudioBuffer.h"
-#include "modules/webaudio/AudioContext.h"
#include "modules/webaudio/AudioNodeInput.h"
#include "modules/webaudio/AudioNodeOutput.h"
#include "platform/audio/Reverb.h"
@@ -127,8 +126,7 @@ void ConvolverHandler::setBuffer(AudioBuffer* buffer, ExceptionState& exceptionS
bufferBus->setSampleRate(buffer->sampleRate());
// Create the reverb with the given impulse response.
- bool useBackgroundThreads = !context()->isOfflineContext();
- OwnPtr<Reverb> reverb = adoptPtr(new Reverb(bufferBus.get(), ProcessingSizeInFrames, MaxFFTSize, 2, useBackgroundThreads, m_normalize));
+ OwnPtr<Reverb> reverb = adoptPtr(new Reverb(bufferBus.get(), ProcessingSizeInFrames, MaxFFTSize, 2, context() && context()->hasRealtimeConstraint(), m_normalize));
{
// Synchronize with process().
@@ -166,13 +164,13 @@ double ConvolverHandler::latencyTime() const
// ----------------------------------------------------------------
-ConvolverNode::ConvolverNode(AudioContext& context, float sampleRate)
+ConvolverNode::ConvolverNode(AbstractAudioContext& context, float sampleRate)
: AudioNode(context)
{
setHandler(ConvolverHandler::create(*this, sampleRate));
}
-ConvolverNode* ConvolverNode::create(AudioContext& context, float sampleRate)
+ConvolverNode* ConvolverNode::create(AbstractAudioContext& context, float sampleRate)
{
return new ConvolverNode(context, sampleRate);
}
« no previous file with comments | « Source/modules/webaudio/ConvolverNode.h ('k') | Source/modules/webaudio/ConvolverNodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698