OLD | NEW |
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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 } else { | 243 } else { |
244 program = L"control.exe"; | 244 program = L"control.exe"; |
245 argument = "mmsys.cpl,,1"; | 245 argument = "mmsys.cpl,,1"; |
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::LaunchOptions options; | 253 base::LaunchProcess(command_line, base::LaunchOptions(), NULL); |
254 base::LaunchProcess(command_line, options); | |
255 } | 254 } |
256 | 255 |
257 void AudioManagerWin::GetAudioInputDeviceNames( | 256 void AudioManagerWin::GetAudioInputDeviceNames( |
258 media::AudioDeviceNames* device_names) { | 257 media::AudioDeviceNames* device_names) { |
259 // TODO(xians): query a full list of valid devices. | 258 // TODO(xians): query a full list of valid devices. |
260 if (HasAudioInputDevices()) { | 259 if (HasAudioInputDevices()) { |
261 // Add the default device to the list. | 260 // Add the default device to the list. |
262 // We use index 0 to make up the unique_id to identify the | 261 // We use index 0 to make up the unique_id to identify the |
263 // default devices. | 262 // default devices. |
264 media::AudioDeviceName name; | 263 media::AudioDeviceName name; |
265 name.device_name = AudioManagerBase::kDefaultDeviceName; | 264 name.device_name = AudioManagerBase::kDefaultDeviceName; |
266 name.unique_id = "0"; | 265 name.unique_id = "0"; |
267 device_names->push_back(name); | 266 device_names->push_back(name); |
268 } | 267 } |
269 } | 268 } |
270 | 269 |
271 // static | 270 // static |
272 AudioManager* AudioManager::CreateAudioManager() { | 271 AudioManager* AudioManager::CreateAudioManager() { |
273 return new AudioManagerWin(); | 272 return new AudioManagerWin(); |
274 } | 273 } |
OLD | NEW |