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

Unified Diff: Source/core/platform/audio/Reverb.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/core/platform/audio/MultiChannelResampler.cpp ('k') | Source/core/platform/audio/SincResampler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/audio/Reverb.cpp
diff --git a/Source/core/platform/audio/Reverb.cpp b/Source/core/platform/audio/Reverb.cpp
index 1c23082b01d179e2e1348246fb74a6d1d87897c1..0a934ad7c0e0b2030ee6b4862bbcb371780b3a1d 100644
--- a/Source/core/platform/audio/Reverb.cpp
+++ b/Source/core/platform/audio/Reverb.cpp
@@ -132,7 +132,7 @@ void Reverb::initialize(AudioBus* impulseResponseBuffer, size_t renderSliceSize,
// For "True" stereo processing we allocate a temporary buffer to avoid repeatedly allocating it in the process() method.
// It can be bad to allocate memory in a real-time thread.
if (numResponseChannels == 4)
- m_tempBuffer = adoptRef(new AudioBus(2, MaxFrameSize));
+ m_tempBuffer = AudioBus::create(2, MaxFrameSize);
}
void Reverb::process(const AudioBus* sourceBus, AudioBus* destinationBus, size_t framesToProcess)
« no previous file with comments | « Source/core/platform/audio/MultiChannelResampler.cpp ('k') | Source/core/platform/audio/SincResampler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698