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::LaunchApp(command_line, false, false, NULL); | 253 base::LaunchOptions options; |
| 254 base::LaunchProcess(command_line, options); |
254 } | 255 } |
255 | 256 |
256 void AudioManagerWin::GetAudioInputDeviceNames( | 257 void AudioManagerWin::GetAudioInputDeviceNames( |
257 media::AudioDeviceNames* device_names) { | 258 media::AudioDeviceNames* device_names) { |
258 // TODO(xians): query a full list of valid devices. | 259 // TODO(xians): query a full list of valid devices. |
259 if (HasAudioInputDevices()) { | 260 if (HasAudioInputDevices()) { |
260 // Add the default device to the list. | 261 // Add the default device to the list. |
261 // We use index 0 to make up the unique_id to identify the | 262 // We use index 0 to make up the unique_id to identify the |
262 // default devices. | 263 // default devices. |
263 media::AudioDeviceName name; | 264 media::AudioDeviceName name; |
264 name.device_name = AudioManagerBase::kDefaultDeviceName; | 265 name.device_name = AudioManagerBase::kDefaultDeviceName; |
265 name.unique_id = "0"; | 266 name.unique_id = "0"; |
266 device_names->push_back(name); | 267 device_names->push_back(name); |
267 } | 268 } |
268 } | 269 } |
269 | 270 |
270 // static | 271 // static |
271 AudioManager* AudioManager::CreateAudioManager() { | 272 AudioManager* AudioManager::CreateAudioManager() { |
272 return new AudioManagerWin(); | 273 return new AudioManagerWin(); |
273 } | 274 } |
OLD | NEW |