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

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

Issue 14628008: Require use of AudioBus::create() to avoid ref-counting issues (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Require use of Created 7 years, 7 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/AudioNodeOutput.cpp ('k') | Source/modules/webaudio/ConvolverNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioParam.cpp
diff --git a/Source/modules/webaudio/AudioParam.cpp b/Source/modules/webaudio/AudioParam.cpp
index 95e45fcbfe4f39931f37f7fa96c5f26155c5cdf4..52013f7d91dc8f92c3d788f8c3be290a8ace010c 100644
--- a/Source/modules/webaudio/AudioParam.cpp
+++ b/Source/modules/webaudio/AudioParam.cpp
@@ -136,8 +136,8 @@ void AudioParam::calculateFinalValues(float* values, unsigned numberOfValues, bo
// Now sum all of the audio-rate connections together (unity-gain summing junction).
// Note that connections would normally be mono, but we mix down to mono if necessary.
- AudioBus summingBus(1, numberOfValues, false);
- summingBus.setChannelMemory(0, values, numberOfValues);
+ RefPtr<AudioBus> summingBus = AudioBus::create(1, numberOfValues, false);
+ summingBus->setChannelMemory(0, values, numberOfValues);
for (unsigned i = 0; i < numberOfRenderingConnections(); ++i) {
AudioNodeOutput* output = renderingOutput(i);
@@ -147,7 +147,7 @@ void AudioParam::calculateFinalValues(float* values, unsigned numberOfValues, bo
AudioBus* connectionBus = output->pull(0, AudioNode::ProcessingSizeInFrames);
// Sum, with unity-gain.
- summingBus.sumFrom(*connectionBus);
+ summingBus->sumFrom(*connectionBus);
}
}
« no previous file with comments | « Source/modules/webaudio/AudioNodeOutput.cpp ('k') | Source/modules/webaudio/ConvolverNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698