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

Unified Diff: media/audio/audio_output_controller.cc

Issue 15979015: Reland 15721002: Hook up the device selection to the WebAudio live audio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the comments. 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: media/audio/audio_output_controller.cc
diff --git a/media/audio/audio_output_controller.cc b/media/audio/audio_output_controller.cc
index 9194bcf69089a403bc166ead230182f6266c5cfb..8e33c7fc892893cd9e889eb660de433b21458885 100644
--- a/media/audio/audio_output_controller.cc
+++ b/media/audio/audio_output_controller.cc
@@ -39,10 +39,12 @@ const int AudioOutputController::kPollPauseInMilliseconds = 3;
AudioOutputController::AudioOutputController(AudioManager* audio_manager,
EventHandler* handler,
const AudioParameters& params,
+ const std::string& input_device_id,
SyncReader* sync_reader)
: audio_manager_(audio_manager),
params_(params),
handler_(handler),
+ input_device_id_(input_device_id),
stream_(NULL),
diverting_to_stream_(NULL),
volume_(1.0),
@@ -67,6 +69,7 @@ scoped_refptr<AudioOutputController> AudioOutputController::Create(
AudioManager* audio_manager,
EventHandler* event_handler,
const AudioParameters& params,
+ const std::string& input_device_id,
SyncReader* sync_reader) {
DCHECK(audio_manager);
DCHECK(sync_reader);
@@ -75,7 +78,7 @@ scoped_refptr<AudioOutputController> AudioOutputController::Create(
return NULL;
scoped_refptr<AudioOutputController> controller(new AudioOutputController(
- audio_manager, event_handler, params, sync_reader));
+ audio_manager, event_handler, params, input_device_id, sync_reader));
controller->message_loop_->PostTask(FROM_HERE, base::Bind(
&AudioOutputController::DoCreate, controller, false));
return controller;
@@ -114,7 +117,7 @@ void AudioOutputController::DoCreate(bool is_for_device_change) {
DCHECK_EQ(kEmpty, state_);
stream_ = diverting_to_stream_ ? diverting_to_stream_ :
- audio_manager_->MakeAudioOutputStreamProxy(params_);
+ audio_manager_->MakeAudioOutputStreamProxy(params_, input_device_id_);
if (!stream_) {
state_ = kError;
handler_->OnError();

Powered by Google App Engine
This is Rietveld 408576698