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

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: Created 7 years, 10 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..9c0b0c4bd2f94bb47d82d45d05d121ca42667bb1 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,10 @@ 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());
- }
-
+ CHECK(render_view);
+ output_device_ =
+ AudioDeviceFactory::NewOutputDevice(render_view->routing_id());
+ output_device_->Initialize(params_, this);
output_device_->Start();
// Note: Default behavior is to auto-play on start.
}

Powered by Google App Engine
This is Rietveld 408576698