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

Unified Diff: media/audio/pulse/pulse_unified.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/pulse/pulse_unified.cc
diff --git a/media/audio/pulse/pulse_unified.cc b/media/audio/pulse/pulse_unified.cc
index 87bb6ae0a18cb191298d01d88b5f52bc3b610906..ee143416038ed24afd218c82435e4f2f662d8d02 100644
--- a/media/audio/pulse/pulse_unified.cc
+++ b/media/audio/pulse/pulse_unified.cc
@@ -41,9 +41,12 @@ void PulseAudioUnifiedStream::ReadCallback(pa_stream* handle, size_t length,
static_cast<PulseAudioUnifiedStream*>(user_data)->ReadData();
}
-PulseAudioUnifiedStream::PulseAudioUnifiedStream(const AudioParameters& params,
- AudioManagerBase* manager)
+PulseAudioUnifiedStream::PulseAudioUnifiedStream(
+ const AudioParameters& params,
+ const std::string& input_device_id,
+ AudioManagerBase* manager)
: params_(params),
+ input_device_id_(input_device_id),
manager_(manager),
pa_context_(NULL),
pa_mainloop_(NULL),
@@ -77,9 +80,8 @@ bool PulseAudioUnifiedStream::Open() {
params_, &StreamNotifyCallback, NULL, this))
return false;
- // TODO(xians): Add support for non-default device.
if (!pulse::CreateInputStream(pa_mainloop_, pa_context_, &input_stream_,
- params_, AudioManagerBase::kDefaultDeviceId,
+ params_, input_device_id_,
&StreamNotifyCallback, this))
return false;

Powered by Google App Engine
This is Rietveld 408576698