OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 std::wstring program; | 223 std::wstring program; |
224 std::string argument; | 224 std::string argument; |
225 if (!CoreAudioUtil::IsSupported()) { | 225 if (!CoreAudioUtil::IsSupported()) { |
226 program = L"sndvol32.exe"; | 226 program = L"sndvol32.exe"; |
227 argument = "-R"; | 227 argument = "-R"; |
228 } else { | 228 } else { |
229 program = L"control.exe"; | 229 program = L"control.exe"; |
230 argument = "mmsys.cpl,,1"; | 230 argument = "mmsys.cpl,,1"; |
231 } | 231 } |
232 | 232 |
233 FilePath path; | 233 base::FilePath path; |
234 PathService::Get(base::DIR_SYSTEM, &path); | 234 PathService::Get(base::DIR_SYSTEM, &path); |
235 path = path.Append(program); | 235 path = path.Append(program); |
236 CommandLine command_line(path); | 236 CommandLine command_line(path); |
237 command_line.AppendArg(argument); | 237 command_line.AppendArg(argument); |
238 base::LaunchProcess(command_line, base::LaunchOptions(), NULL); | 238 base::LaunchProcess(command_line, base::LaunchOptions(), NULL); |
239 } | 239 } |
240 | 240 |
241 void AudioManagerWin::GetAudioInputDeviceNames( | 241 void AudioManagerWin::GetAudioInputDeviceNames( |
242 media::AudioDeviceNames* device_names) { | 242 media::AudioDeviceNames* device_names) { |
243 DCHECK(enumeration_type() != kUninitializedEnumeration); | 243 DCHECK(enumeration_type() != kUninitializedEnumeration); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 channel_layout = WASAPIAudioOutputStream::HardwareChannelLayout(); | 371 channel_layout = WASAPIAudioOutputStream::HardwareChannelLayout(); |
372 } | 372 } |
373 | 373 |
374 // TODO(dalecurtis): This should include hardware bits per channel eventually. | 374 // TODO(dalecurtis): This should include hardware bits per channel eventually. |
375 return AudioParameters( | 375 return AudioParameters( |
376 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, | 376 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, |
377 sample_rate, bits_per_sample, GetAudioHardwareBufferSize()); | 377 sample_rate, bits_per_sample, GetAudioHardwareBufferSize()); |
378 } | 378 } |
379 | 379 |
380 } // namespace media | 380 } // namespace media |
OLD | NEW |