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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // Utilize the MMDevice API (part of Core Audio) for Vista and higher. | 279 // Utilize the MMDevice API (part of Core Audio) for Vista and higher. |
280 if (input) | 280 if (input) |
281 GetInputDeviceNamesWin(device_names); | 281 GetInputDeviceNamesWin(device_names); |
282 else | 282 else |
283 GetOutputDeviceNamesWin(device_names); | 283 GetOutputDeviceNamesWin(device_names); |
284 } | 284 } |
285 | 285 |
286 if (!device_names->empty()) { | 286 if (!device_names->empty()) { |
287 AudioDeviceName name; | 287 AudioDeviceName name; |
288 if (enumeration_type() == kMMDeviceEnumeration) { | 288 if (enumeration_type() == kMMDeviceEnumeration) { |
289 name.device_name = AudioManagerBase::kCommunicationsDeviceName; | 289 name.device_name = AudioManager::GetCommunicationsDeviceName(); |
290 name.unique_id = AudioManagerBase::kCommunicationsDeviceId; | 290 name.unique_id = AudioManagerBase::kCommunicationsDeviceId; |
291 device_names->push_front(name); | 291 device_names->push_front(name); |
292 } | 292 } |
293 // Always add default device parameters as first element. | 293 // Always add default device parameters as first element. |
294 name.device_name = AudioManagerBase::kDefaultDeviceName; | 294 name.device_name = AudioManager::GetDefaultDeviceName(); |
295 name.unique_id = AudioManagerBase::kDefaultDeviceId; | 295 name.unique_id = AudioManagerBase::kDefaultDeviceId; |
296 device_names->push_front(name); | 296 device_names->push_front(name); |
297 } | 297 } |
298 } | 298 } |
299 | 299 |
300 void AudioManagerWin::GetAudioInputDeviceNames(AudioDeviceNames* device_names) { | 300 void AudioManagerWin::GetAudioInputDeviceNames(AudioDeviceNames* device_names) { |
301 GetAudioDeviceNamesImpl(true, device_names); | 301 GetAudioDeviceNamesImpl(true, device_names); |
302 } | 302 } |
303 | 303 |
304 void AudioManagerWin::GetAudioOutputDeviceNames( | 304 void AudioManagerWin::GetAudioOutputDeviceNames( |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers, | 537 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers, |
538 xp_device_id); | 538 xp_device_id); |
539 } | 539 } |
540 | 540 |
541 /// static | 541 /// static |
542 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) { | 542 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) { |
543 return new AudioManagerWin(audio_log_factory); | 543 return new AudioManagerWin(audio_log_factory); |
544 } | 544 } |
545 | 545 |
546 } // namespace media | 546 } // namespace media |
OLD | NEW |