| OLD | NEW |
| 1 // Copyright (c) 2011 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 <CoreAudio/AudioHardware.h> | 5 #include <CoreAudio/AudioHardware.h> |
| 6 | 6 |
| 7 #include "base/mac/mac_logging.h" |
| 7 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 8 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 9 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| 10 #include "media/audio/fake_audio_input_stream.h" | 11 #include "media/audio/fake_audio_input_stream.h" |
| 11 #include "media/audio/fake_audio_output_stream.h" | 12 #include "media/audio/fake_audio_output_stream.h" |
| 12 #include "media/audio/mac/audio_input_mac.h" | 13 #include "media/audio/mac/audio_input_mac.h" |
| 13 #include "media/audio/mac/audio_low_latency_input_mac.h" | 14 #include "media/audio/mac/audio_low_latency_input_mac.h" |
| 14 #include "media/audio/mac/audio_low_latency_output_mac.h" | 15 #include "media/audio/mac/audio_low_latency_output_mac.h" |
| 15 #include "media/audio/mac/audio_manager_mac.h" | 16 #include "media/audio/mac/audio_manager_mac.h" |
| 16 #include "media/audio/mac/audio_output_mac.h" | 17 #include "media/audio/mac/audio_output_mac.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 property_address.mSelector = kAudioHardwarePropertyDeviceForUID; | 221 property_address.mSelector = kAudioHardwarePropertyDeviceForUID; |
| 221 result = AudioObjectGetPropertyData(kAudioObjectSystemObject, | 222 result = AudioObjectGetPropertyData(kAudioObjectSystemObject, |
| 222 &property_address, | 223 &property_address, |
| 223 0, | 224 0, |
| 224 0, | 225 0, |
| 225 &translation_size, | 226 &translation_size, |
| 226 &value); | 227 &value); |
| 227 } | 228 } |
| 228 | 229 |
| 229 if (result) { | 230 if (result) { |
| 230 DLOG(WARNING) << "Unable to query device " << device_id | 231 OSSTATUS_DLOG(WARNING, result) << "Unable to query device " << device_id |
| 231 << " for AudioDeviceID "; | 232 << " for AudioDeviceID"; |
| 232 } | 233 } |
| 233 | 234 |
| 234 return audio_device_id; | 235 return audio_device_id; |
| 235 } | 236 } |
| 236 | 237 |
| 237 AudioManagerMac::AudioManagerMac() | 238 AudioManagerMac::AudioManagerMac() |
| 238 : num_output_streams_(0) { | 239 : num_output_streams_(0) { |
| 239 } | 240 } |
| 240 | 241 |
| 241 AudioManagerMac::~AudioManagerMac() { | 242 AudioManagerMac::~AudioManagerMac() { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 330 } |
| 330 | 331 |
| 331 // Called by the stream when it has been released by calling Close(). | 332 // Called by the stream when it has been released by calling Close(). |
| 332 void AudioManagerMac::ReleaseInputStream(AudioInputStream* stream) { | 333 void AudioManagerMac::ReleaseInputStream(AudioInputStream* stream) { |
| 333 delete stream; | 334 delete stream; |
| 334 } | 335 } |
| 335 | 336 |
| 336 AudioManager* CreateAudioManager() { | 337 AudioManager* CreateAudioManager() { |
| 337 return new AudioManagerMac(); | 338 return new AudioManagerMac(); |
| 338 } | 339 } |
| OLD | NEW |