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

Unified Diff: Source/modules/webaudio/MediaStreamAudioDestinationNode.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/modules/webaudio/MediaStreamAudioDestinationNode.cpp
diff --git a/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp b/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp
index a5f5074da7dcafe51cb49fc2fea162d98be6280a..93bc9c92f89b0d1a60e7379e1eb50c41e53f1f4f 100644
--- a/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp
+++ b/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp
@@ -45,7 +45,7 @@ PassRefPtr<MediaStreamAudioDestinationNode> MediaStreamAudioDestinationNode::cre
MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode(AudioContext* context, size_t numberOfChannels)
: AudioBasicInspectorNode(context, context->sampleRate(), numberOfChannels)
- , m_mixBus(numberOfChannels, ProcessingSizeInFrames)
+ , m_mixBus(AudioBus::create(numberOfChannels, ProcessingSizeInFrames))
{
setNodeType(NodeTypeMediaStreamAudioDestination);
@@ -73,8 +73,8 @@ MediaStreamAudioDestinationNode::~MediaStreamAudioDestinationNode()
void MediaStreamAudioDestinationNode::process(size_t numberOfFrames)
{
- m_mixBus.copyFrom(*input(0)->bus());
- m_source->consumeAudio(&m_mixBus, numberOfFrames);
+ m_mixBus->copyFrom(*input(0)->bus());
+ m_source->consumeAudio(m_mixBus.get(), numberOfFrames);
}
void MediaStreamAudioDestinationNode::reset()
« no previous file with comments | « Source/modules/webaudio/MediaStreamAudioDestinationNode.h ('k') | Source/modules/webaudio/OfflineAudioDestinationNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698