| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |