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 | |
17 static const int kMinIntervalBetweenVolumeUpdatesMs = 1000; | 15 static const int kMinIntervalBetweenVolumeUpdatesMs = 1000; |
18 | 16 |
19 static std::ostream& operator<<(std::ostream& os, | 17 static std::ostream& operator<<(std::ostream& os, |
20 const AudioStreamBasicDescription& format) { | 18 const AudioStreamBasicDescription& format) { |
21 os << "sample rate : " << format.mSampleRate << std::endl | 19 os << "sample rate : " << format.mSampleRate << std::endl |
22 << "format ID : " << format.mFormatID << std::endl | 20 << "format ID : " << format.mFormatID << std::endl |
23 << "format flags : " << format.mFormatFlags << std::endl | 21 << "format flags : " << format.mFormatFlags << std::endl |
24 << "bytes per packet : " << format.mBytesPerPacket << std::endl | 22 << "bytes per packet : " << format.mBytesPerPacket << std::endl |
25 << "frames per packet : " << format.mFramesPerPacket << std::endl | 23 << "frames per packet : " << format.mFramesPerPacket << std::endl |
26 << "bytes per frame : " << format.mBytesPerFrame << std::endl | 24 << "bytes per frame : " << format.mBytesPerFrame << std::endl |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 AudioObjectPropertyAddress property_address = { | 597 AudioObjectPropertyAddress property_address = { |
600 kAudioDevicePropertyVolumeScalar, | 598 kAudioDevicePropertyVolumeScalar, |
601 kAudioDevicePropertyScopeInput, | 599 kAudioDevicePropertyScopeInput, |
602 static_cast<UInt32>(channel) | 600 static_cast<UInt32>(channel) |
603 }; | 601 }; |
604 OSStatus result = AudioObjectIsPropertySettable(input_device_id_, | 602 OSStatus result = AudioObjectIsPropertySettable(input_device_id_, |
605 &property_address, | 603 &property_address, |
606 &is_settable); | 604 &is_settable); |
607 return (result == noErr) ? is_settable : false; | 605 return (result == noErr) ? is_settable : false; |
608 } | 606 } |
609 | |
610 } // namespace media | |
OLD | NEW |