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 <CoreAudio/AudioHardware.h> | 5 #include <CoreAudio/AudioHardware.h> |
6 | 6 |
7 #include "base/mac/mac_logging.h" | 7 #include "base/mac/mac_logging.h" |
8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 AudioInputStream* AudioManagerMac::MakeLinearInputStream( | 276 AudioInputStream* AudioManagerMac::MakeLinearInputStream( |
277 const AudioParameters& params, const std::string& device_id) { | 277 const AudioParameters& params, const std::string& device_id) { |
278 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 278 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
279 return new PCMQueueInAudioInputStream(this, params); | 279 return new PCMQueueInAudioInputStream(this, params); |
280 } | 280 } |
281 | 281 |
282 AudioInputStream* AudioManagerMac::MakeLowLatencyInputStream( | 282 AudioInputStream* AudioManagerMac::MakeLowLatencyInputStream( |
283 const AudioParameters& params, const std::string& device_id) { | 283 const AudioParameters& params, const std::string& device_id) { |
284 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); | 284 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); |
285 // Gets the AudioDeviceID that refers to the AudioDevice with the device | 285 // Gets the AudioDeviceID that refers to the AudioOutputDevice with the device |
286 // unique id. This AudioDeviceID is used to set the device for Audio Unit. | 286 // unique id. This AudioDeviceID is used to set the device for Audio Unit. |
287 AudioDeviceID audio_device_id = GetAudioDeviceIdByUId(true, device_id); | 287 AudioDeviceID audio_device_id = GetAudioDeviceIdByUId(true, device_id); |
288 AudioInputStream* stream = NULL; | 288 AudioInputStream* stream = NULL; |
289 if (audio_device_id != kAudioObjectUnknown) | 289 if (audio_device_id != kAudioObjectUnknown) |
290 stream = new AUAudioInputStream(this, params, audio_device_id); | 290 stream = new AUAudioInputStream(this, params, audio_device_id); |
291 | 291 |
292 return stream; | 292 return stream; |
293 } | 293 } |
294 | 294 |
295 AudioManager* CreateAudioManager() { | 295 AudioManager* CreateAudioManager() { |
296 return new AudioManagerMac(); | 296 return new AudioManagerMac(); |
297 } | 297 } |
298 | 298 |
299 } // namespace media | 299 } // namespace media |
OLD | NEW |