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

Side by Side Diff: media/audio/mac/audio_manager_mac.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/cras/audio_manager_cras.cc ('k') | media/audio/pulse/audio_manager_pulse.cc » ('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/mac/audio_manager_mac.h" 5 #include "media/audio/mac/audio_manager_mac.h"
6 6
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/mac_logging.h" 10 #include "base/mac/mac_logging.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 CFRelease(uid); 145 CFRelease(uid);
146 if (name) 146 if (name)
147 CFRelease(name); 147 CFRelease(name);
148 } 148 }
149 149
150 if (!device_names->empty()) { 150 if (!device_names->empty()) {
151 // Prepend the default device to the list since we always want it to be 151 // Prepend the default device to the list since we always want it to be
152 // on the top of the list for all platforms. There is no duplicate 152 // on the top of the list for all platforms. There is no duplicate
153 // counting here since the default device has been abstracted out before. 153 // counting here since the default device has been abstracted out before.
154 media::AudioDeviceName name; 154 media::AudioDeviceName name;
155 name.device_name = AudioManagerBase::kDefaultDeviceName; 155 name.device_name = AudioManager::GetDefaultDeviceName();
156 name.unique_id = AudioManagerBase::kDefaultDeviceId; 156 name.unique_id = AudioManagerBase::kDefaultDeviceId;
157 device_names->push_front(name); 157 device_names->push_front(name);
158 } 158 }
159 } 159 }
160 160
161 static AudioDeviceID GetAudioDeviceIdByUId(bool is_input, 161 static AudioDeviceID GetAudioDeviceIdByUId(bool is_input,
162 const std::string& device_id) { 162 const std::string& device_id) {
163 AudioObjectPropertyAddress property_address = { 163 AudioObjectPropertyAddress property_address = {
164 kAudioHardwarePropertyDevices, 164 kAudioHardwarePropertyDevices,
165 kAudioObjectPropertyScopeGlobal, 165 kAudioObjectPropertyScopeGlobal,
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 basic_input_streams_.erase(stream_it); 826 basic_input_streams_.erase(stream_it);
827 827
828 AudioManagerBase::ReleaseInputStream(stream); 828 AudioManagerBase::ReleaseInputStream(stream);
829 } 829 }
830 830
831 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) { 831 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) {
832 return new AudioManagerMac(audio_log_factory); 832 return new AudioManagerMac(audio_log_factory);
833 } 833 }
834 834
835 } // namespace media 835 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/cras/audio_manager_cras.cc ('k') | media/audio/pulse/audio_manager_pulse.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698