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

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

Issue 1362093002: Re-land: Add localized default audio device names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude media_resource_provider on iOS. Created 5 years, 2 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
« no previous file with comments | « media/audio/pulse/audio_manager_pulse.cc ('k') | media/base/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/audio/pulse/audio_manager_pulse.cc ('k') | media/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698