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

Side by Side Diff: media/audio/win/audio_manager_win.cc

Issue 7060011: Adding GetAudioInputDeviceNames to AudioManager, this function is supposed to do device enumerati... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/audio_io.h" 5 #include "media/audio/audio_io.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <objbase.h> // This has to be before initguid.h 8 #include <objbase.h> // This has to be before initguid.h
9 #include <initguid.h> 9 #include <initguid.h>
10 #include <mmsystem.h> 10 #include <mmsystem.h>
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 247
248 FilePath path; 248 FilePath path;
249 PathService::Get(base::DIR_SYSTEM, &path); 249 PathService::Get(base::DIR_SYSTEM, &path);
250 path = path.Append(program); 250 path = path.Append(program);
251 CommandLine command_line(path); 251 CommandLine command_line(path);
252 command_line.AppendArg(argument); 252 command_line.AppendArg(argument);
253 base::LaunchApp(command_line, false, false, NULL); 253 base::LaunchApp(command_line, false, false, NULL);
254 } 254 }
255 255
256 void AudioManagerWin::GetAudioInputDeviceNames(
257 media::AudioDeviceNames* device_names) {
258 // TODO(xians): query a full list of valid devices.
259 if (HasAudioInputDevices()) {
260 // Add the default device to the list.
261 // We use index 0 to make up the unique_id to identify the
262 // default devices.
263 media::AudioDeviceName name;
264 name.device_name = AudioManagerBase::kDefaultDeviceName;
265 name.unique_id = std::string("0");
scherkus (not reviewing) 2011/05/27 19:10:37 nit: "0"
xians 2011/05/30 13:11:46 Done.
266 device_names->push_back(name);
267 }
268 }
269
256 // static 270 // static
257 AudioManager* AudioManager::CreateAudioManager() { 271 AudioManager* AudioManager::CreateAudioManager() {
258 return new AudioManagerWin(); 272 return new AudioManagerWin();
259 } 273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698