OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_auhal_mac.h" | 5 #include "media/audio/mac/audio_auhal_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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 source_(NULL), | 69 source_(NULL), |
70 device_(device), | 70 device_(device), |
71 audio_unit_(0), | 71 audio_unit_(0), |
72 volume_(1), | 72 volume_(1), |
73 hardware_latency_frames_(0), | 73 hardware_latency_frames_(0), |
74 stopped_(false), | 74 stopped_(false), |
75 input_buffer_list_(NULL) { | 75 input_buffer_list_(NULL) { |
76 // We must have a manager. | 76 // We must have a manager. |
77 DCHECK(manager_); | 77 DCHECK(manager_); |
78 | 78 |
79 DVLOG(1) << "Input channels: " << input_channels_; | 79 VLOG(1) << "AUHALStream::AUHALStream()"; |
80 DVLOG(1) << "Output channels: " << output_channels_; | 80 VLOG(1) << "Device: " << device; |
81 DVLOG(1) << "Sample rate: " << params_.sample_rate(); | 81 VLOG(1) << "Input channels: " << input_channels_; |
82 DVLOG(1) << "Buffer size: " << number_of_frames_; | 82 VLOG(1) << "Output channels: " << output_channels_; |
| 83 VLOG(1) << "Sample rate: " << params_.sample_rate(); |
| 84 VLOG(1) << "Buffer size: " << number_of_frames_; |
83 } | 85 } |
84 | 86 |
85 AUHALStream::~AUHALStream() { | 87 AUHALStream::~AUHALStream() { |
86 } | 88 } |
87 | 89 |
88 bool AUHALStream::Open() { | 90 bool AUHALStream::Open() { |
89 // Get the total number of input and output channels that the | 91 // Get the total number of input and output channels that the |
90 // hardware supports. | 92 // hardware supports. |
91 int device_input_channels; | 93 int device_input_channels; |
92 bool got_input_channels = AudioManagerMac::GetDeviceChannels( | 94 bool got_input_channels = AudioManagerMac::GetDeviceChannels( |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 0, | 522 0, |
521 &callback, | 523 &callback, |
522 sizeof(callback)); | 524 sizeof(callback)); |
523 if (result != noErr) | 525 if (result != noErr) |
524 return false; | 526 return false; |
525 | 527 |
526 return true; | 528 return true; |
527 } | 529 } |
528 | 530 |
529 } // namespace media | 531 } // namespace media |
OLD | NEW |