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

Unified Diff: Source/core/platform/audio/SincResampler.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
Index: Source/core/platform/audio/SincResampler.cpp
diff --git a/Source/core/platform/audio/SincResampler.cpp b/Source/core/platform/audio/SincResampler.cpp
index 9f49b75598874ae989689e6f5faee5ac3c371f77..cb070f8e41db628d9ad8b2eda13008a723503ec7 100644
--- a/Source/core/platform/audio/SincResampler.cpp
+++ b/Source/core/platform/audio/SincResampler.cpp
@@ -134,12 +134,12 @@ void SincResampler::consumeSource(float* buffer, unsigned numberOfSourceFrames)
return;
// Wrap the provided buffer by an AudioBus for use by the source provider.
- AudioBus bus(1, numberOfSourceFrames, false);
+ RefPtr<AudioBus> bus = AudioBus::create(1, numberOfSourceFrames, false);
// FIXME: Find a way to make the following const-correct:
- bus.setChannelMemory(0, buffer, numberOfSourceFrames);
+ bus->setChannelMemory(0, buffer, numberOfSourceFrames);
- m_sourceProvider->provideInput(&bus, numberOfSourceFrames);
+ m_sourceProvider->provideInput(bus.get(), numberOfSourceFrames);
}
namespace {
« no previous file with comments | « Source/core/platform/audio/Reverb.cpp ('k') | Source/core/platform/audio/chromium/AudioDestinationChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698