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

Unified Diff: content/renderer/media/renderer_webaudiodevice_impl.cc

Issue 12383016: Merge AssociateStreamWithProducer message into CreateStream message for both audio output and input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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: content/renderer/media/renderer_webaudiodevice_impl.cc
diff --git a/content/renderer/media/renderer_webaudiodevice_impl.cc b/content/renderer/media/renderer_webaudiodevice_impl.cc
index ca32103cafc825e2979a4f3366626795f1f896f0..43a4a61ef84b5e8334e1213964e66051afd28e62 100644
--- a/content/renderer/media/renderer_webaudiodevice_impl.cc
+++ b/content/renderer/media/renderer_webaudiodevice_impl.cc
@@ -7,8 +7,8 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "content/renderer/media/audio_device_factory.h"
-#include "content/renderer/media/renderer_audio_output_device.h"
#include "content/renderer/render_view_impl.h"
+#include "media/audio/audio_output_device.h"
#include "media/base/media_switches.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
@@ -38,9 +38,6 @@ void RendererWebAudioDeviceImpl::start() {
if (output_device_)
return; // Already started.
- output_device_ = AudioDeviceFactory::NewOutputDevice();
- output_device_->Initialize(params_, this);
-
// Assumption: This method is being invoked within a V8 call stack. CHECKs
// will fail in the call to frameForCurrentContext() otherwise.
//
@@ -52,10 +49,9 @@ void RendererWebAudioDeviceImpl::start() {
WebView* const web_view = web_frame ? web_frame->view() : NULL;
RenderViewImpl* const render_view =
web_view ? RenderViewImpl::FromWebView(web_view) : NULL;
- if (render_view) {
- output_device_->SetSourceRenderView(render_view->routing_id());
- }
-
+ output_device_ = AudioDeviceFactory::NewOutputDevice(
+ render_view ? render_view->routing_id() : MSG_ROUTING_NONE);
+ output_device_->Initialize(params_, this);
output_device_->Start();
// Note: Default behavior is to auto-play on start.
}
« no previous file with comments | « content/renderer/media/renderer_webaudiodevice_impl.h ('k') | content/renderer/media/webrtc_audio_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698