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

Unified Diff: Source/modules/webaudio/AudioDestinationNode.h

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/chromium/support/WebAudioBus.cpp ('k') | Source/modules/webaudio/AudioNodeInput.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioDestinationNode.h
diff --git a/Source/modules/webaudio/AudioDestinationNode.h b/Source/modules/webaudio/AudioDestinationNode.h
index e1b81e78659ada6bfa736e998c6d0a3c00ee79e0..53342104d00717012bed61e00d9efe752dbe9bc8 100644
--- a/Source/modules/webaudio/AudioDestinationNode.h
+++ b/Source/modules/webaudio/AudioDestinationNode.h
@@ -67,27 +67,27 @@ protected:
class LocalAudioInputProvider : public AudioSourceProvider {
public:
LocalAudioInputProvider()
- : m_sourceBus(2, AudioNode::ProcessingSizeInFrames) // FIXME: handle non-stereo local input.
+ : m_sourceBus(AudioBus::create(2, AudioNode::ProcessingSizeInFrames)) // FIXME: handle non-stereo local input.
{
}
void set(AudioBus* bus)
{
if (bus)
- m_sourceBus.copyFrom(*bus);
+ m_sourceBus->copyFrom(*bus);
}
// AudioSourceProvider.
virtual void provideInput(AudioBus* destinationBus, size_t numberOfFrames)
{
- bool isGood = destinationBus && destinationBus->length() == numberOfFrames && m_sourceBus.length() == numberOfFrames;
+ bool isGood = destinationBus && destinationBus->length() == numberOfFrames && m_sourceBus->length() == numberOfFrames;
ASSERT(isGood);
if (isGood)
- destinationBus->copyFrom(m_sourceBus);
+ destinationBus->copyFrom(*m_sourceBus);
}
private:
- AudioBus m_sourceBus;
+ RefPtr<AudioBus> m_sourceBus;
};
virtual double tailTime() const OVERRIDE { return 0; }
« no previous file with comments | « Source/core/platform/chromium/support/WebAudioBus.cpp ('k') | Source/modules/webaudio/AudioNodeInput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698