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