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

Unified Diff: Source/core/platform/audio/AudioResampler.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/AudioPullFIFO.cpp ('k') | Source/core/platform/audio/MultiChannelResampler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/audio/AudioResampler.cpp
diff --git a/Source/core/platform/audio/AudioResampler.cpp b/Source/core/platform/audio/AudioResampler.cpp
index 7b5dd9f875049982ceda2ce943cd54f1fdc4af9f..faeecae1bbfbca8b167d9918e6203c24c0b0abe2 100644
--- a/Source/core/platform/audio/AudioResampler.cpp
+++ b/Source/core/platform/audio/AudioResampler.cpp
@@ -42,7 +42,7 @@ AudioResampler::AudioResampler()
: m_rate(1.0)
{
m_kernels.append(adoptPtr(new AudioResamplerKernel(this)));
- m_sourceBus = adoptRef(new AudioBus(1, 0, false));
+ m_sourceBus = AudioBus::create(1, 0, false);
}
AudioResampler::AudioResampler(unsigned numberOfChannels)
@@ -51,7 +51,7 @@ AudioResampler::AudioResampler(unsigned numberOfChannels)
for (unsigned i = 0; i < numberOfChannels; ++i)
m_kernels.append(adoptPtr(new AudioResamplerKernel(this)));
- m_sourceBus = adoptRef(new AudioBus(numberOfChannels, 0, false));
+ m_sourceBus = AudioBus::create(numberOfChannels, 0, false);
}
void AudioResampler::configureChannels(unsigned numberOfChannels)
@@ -68,7 +68,7 @@ void AudioResampler::configureChannels(unsigned numberOfChannels)
m_kernels.resize(numberOfChannels);
// Reconfigure our source bus to the new channel size.
- m_sourceBus = adoptRef(new AudioBus(numberOfChannels, 0, false));
+ m_sourceBus = AudioBus::create(numberOfChannels, 0, false);
}
void AudioResampler::process(AudioSourceProvider* provider, AudioBus* destinationBus, size_t framesToProcess)
« no previous file with comments | « Source/core/platform/audio/AudioPullFIFO.cpp ('k') | Source/core/platform/audio/MultiChannelResampler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698