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

Unified Diff: media/audio/win/audio_unified_win.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/win/audio_unified_win.cc
diff --git a/media/audio/win/audio_unified_win.cc b/media/audio/win/audio_unified_win.cc
index 6e00b28a72403407ca063f8f24a303773ce28edb..c69d114586da29a4098402c096f01212b42b4501 100644
--- a/media/audio/win/audio_unified_win.cc
+++ b/media/audio/win/audio_unified_win.cc
@@ -109,12 +109,14 @@ static double FrameCountToMilliseconds(int num_frames,
namespace media {
WASAPIUnifiedStream::WASAPIUnifiedStream(AudioManagerWin* manager,
- const AudioParameters& params)
+ const AudioParameters& params,
+ const std::string& input_device_id)
: creating_thread_id_(base::PlatformThread::CurrentId()),
manager_(manager),
params_(params),
input_channels_(params.input_channels()),
output_channels_(params.channels()),
+ input_device_id_(input_device_id),
share_mode_(CoreAudioUtil::GetShareMode()),
audio_io_thread_(NULL),
opened_(false),
@@ -328,7 +330,8 @@ bool WASAPIUnifiedStream::Open() {
return false;
// Capture side (always event driven but format depends on varispeed or not):
-
+ // TODO(henrika): Open the correct input device with |input_device_id_|,
+ // http://crbug.com/147327.
ScopedComPtr<IAudioClient> audio_input_client =
CoreAudioUtil::CreateDefaultClient(eCapture, eConsole);
if (!audio_input_client)

Powered by Google App Engine
This is Rietveld 408576698