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_low_latency_input_mac.h" | 5 #include "media/audio/mac/audio_low_latency_input_mac.h" |
6 | 6 |
7 #include <CoreServices/CoreServices.h> | 7 #include <CoreServices/CoreServices.h> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/mac/mac_logging.h" | 11 #include "base/mac/mac_logging.h" |
12 #include "media/audio/audio_util.h" | 12 #include "media/audio/audio_util.h" |
13 #include "media/audio/mac/audio_manager_mac.h" | 13 #include "media/audio/mac/audio_manager_mac.h" |
14 | 14 |
| 15 namespace media { |
| 16 |
15 static std::ostream& operator<<(std::ostream& os, | 17 static std::ostream& operator<<(std::ostream& os, |
16 const AudioStreamBasicDescription& format) { | 18 const AudioStreamBasicDescription& format) { |
17 os << "sample rate : " << format.mSampleRate << std::endl | 19 os << "sample rate : " << format.mSampleRate << std::endl |
18 << "format ID : " << format.mFormatID << std::endl | 20 << "format ID : " << format.mFormatID << std::endl |
19 << "format flags : " << format.mFormatFlags << std::endl | 21 << "format flags : " << format.mFormatFlags << std::endl |
20 << "bytes per packet : " << format.mBytesPerPacket << std::endl | 22 << "bytes per packet : " << format.mBytesPerPacket << std::endl |
21 << "frames per packet : " << format.mFramesPerPacket << std::endl | 23 << "frames per packet : " << format.mFramesPerPacket << std::endl |
22 << "bytes per frame : " << format.mBytesPerFrame << std::endl | 24 << "bytes per frame : " << format.mBytesPerFrame << std::endl |
23 << "channels per frame: " << format.mChannelsPerFrame << std::endl | 25 << "channels per frame: " << format.mChannelsPerFrame << std::endl |
24 << "bits per channel : " << format.mBitsPerChannel; | 26 << "bits per channel : " << format.mBitsPerChannel; |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 AudioObjectPropertyAddress property_address = { | 577 AudioObjectPropertyAddress property_address = { |
576 kAudioDevicePropertyVolumeScalar, | 578 kAudioDevicePropertyVolumeScalar, |
577 kAudioDevicePropertyScopeInput, | 579 kAudioDevicePropertyScopeInput, |
578 static_cast<UInt32>(channel) | 580 static_cast<UInt32>(channel) |
579 }; | 581 }; |
580 OSStatus result = AudioObjectIsPropertySettable(input_device_id_, | 582 OSStatus result = AudioObjectIsPropertySettable(input_device_id_, |
581 &property_address, | 583 &property_address, |
582 &is_settable); | 584 &is_settable); |
583 return (result == noErr) ? is_settable : false; | 585 return (result == noErr) ? is_settable : false; |
584 } | 586 } |
| 587 |
| 588 } // namespace media |
OLD | NEW |