| 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 // Implementation notes: | 5 // Implementation notes: |
| 6 // | 6 // |
| 7 // - It is recommended to first acquire the native sample rate of the default | 7 // - It is recommended to first acquire the native sample rate of the default |
| 8 // output device and then use the same rate when creating this object. | 8 // output device and then use the same rate when creating this object. |
| 9 // Use AudioManagerMac::HardwareSampleRate() to retrieve the sample rate. | 9 // Use AudioManagerMac::HardwareSampleRate() to retrieve the sample rate. |
| 10 // - Calling Close() also leads to self destruction. | 10 // - Calling Close() also leads to self destruction. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // Returns the playout time for a given AudioTimeStamp. | 134 // Returns the playout time for a given AudioTimeStamp. |
| 135 base::TimeTicks GetPlayoutTime(const AudioTimeStamp* output_time_stamp); | 135 base::TimeTicks GetPlayoutTime(const AudioTimeStamp* output_time_stamp); |
| 136 | 136 |
| 137 // Updates playout timestamp, current lost frames, and total lost frames and | 137 // Updates playout timestamp, current lost frames, and total lost frames and |
| 138 // glitches. | 138 // glitches. |
| 139 void UpdatePlayoutTimestamp(const AudioTimeStamp* timestamp); | 139 void UpdatePlayoutTimestamp(const AudioTimeStamp* timestamp); |
| 140 | 140 |
| 141 // Called from the dtor and when the stream is reset. | 141 // Called from the dtor and when the stream is reset. |
| 142 void ReportAndResetStats(); | 142 void ReportAndResetStats(); |
| 143 | 143 |
| 144 // Converts |params_.channel_layout()| into CoreAudio format and sets up the |
| 145 // AUHAL with our layout information so it knows how to remap the channels. |
| 146 void SetAudioChannelLayout(); |
| 147 |
| 144 // Our creator, the audio manager needs to be notified when we close. | 148 // Our creator, the audio manager needs to be notified when we close. |
| 145 AudioManagerMac* const manager_; | 149 AudioManagerMac* const manager_; |
| 146 | 150 |
| 147 const AudioParameters params_; | 151 const AudioParameters params_; |
| 148 // For convenience - same as in params_. | 152 // For convenience - same as in params_. |
| 149 const int output_channels_; | 153 const int output_channels_; |
| 150 | 154 |
| 151 // Size of audio buffer requested at construction. The actual buffer size | 155 // Size of audio buffer requested at construction. The actual buffer size |
| 152 // is given by |actual_io_buffer_frame_size_| and it can differ from the | 156 // is given by |actual_io_buffer_frame_size_| and it can differ from the |
| 153 // requested size. | 157 // requested size. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 // Used to make sure control functions (Start(), Stop() etc) are called on the | 226 // Used to make sure control functions (Start(), Stop() etc) are called on the |
| 223 // right thread. | 227 // right thread. |
| 224 base::ThreadChecker thread_checker_; | 228 base::ThreadChecker thread_checker_; |
| 225 | 229 |
| 226 DISALLOW_COPY_AND_ASSIGN(AUHALStream); | 230 DISALLOW_COPY_AND_ASSIGN(AUHALStream); |
| 227 }; | 231 }; |
| 228 | 232 |
| 229 } // namespace media | 233 } // namespace media |
| 230 | 234 |
| 231 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ | 235 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ |
| OLD | NEW |