Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: media/audio/mac/audio_low_latency_input_mac.cc

Issue 9968054: Move media/audio files into media namespace (relanding) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « media/audio/mac/audio_low_latency_input_mac.h ('k') | media/audio/mac/audio_low_latency_input_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698