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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 // Volume level from 0 to 1. | 171 // Volume level from 0 to 1. |
172 float volume_; | 172 float volume_; |
173 | 173 |
174 // Fixed playout hardware latency in frames. | 174 // Fixed playout hardware latency in frames. |
175 double hardware_latency_frames_; | 175 double hardware_latency_frames_; |
176 | 176 |
177 // This flag will be set to false while we're actively receiving callbacks. | 177 // This flag will be set to false while we're actively receiving callbacks. |
178 bool stopped_; | 178 bool stopped_; |
179 | 179 |
180 // Container for retrieving data from AudioSourceCallback::OnMoreData(). | 180 // Container for retrieving data from AudioSourceCallback::OnMoreData(). |
181 scoped_ptr<AudioBus> output_bus_; | 181 std::unique_ptr<AudioBus> output_bus_; |
danakj
2016/04/22 22:47:36
include memory
dcheng
2016/04/22 23:13:20
Done.
| |
182 | 182 |
183 // Dynamically allocated FIFO used when CoreAudio asks for unexpected frame | 183 // Dynamically allocated FIFO used when CoreAudio asks for unexpected frame |
184 // sizes. | 184 // sizes. |
185 scoped_ptr<AudioPullFifo> audio_fifo_; | 185 std::unique_ptr<AudioPullFifo> audio_fifo_; |
186 | 186 |
187 // Current buffer delay. Set by Render(). | 187 // Current buffer delay. Set by Render(). |
188 uint32_t current_hardware_pending_bytes_; | 188 uint32_t current_hardware_pending_bytes_; |
189 | 189 |
190 // Lost frames not yet reported to the provider. Increased in | 190 // Lost frames not yet reported to the provider. Increased in |
191 // UpdatePlayoutTimestamp() if any lost frame since last time. Forwarded to | 191 // UpdatePlayoutTimestamp() if any lost frame since last time. Forwarded to |
192 // the provider and reset in ProvideInput(). | 192 // the provider and reset in ProvideInput(). |
193 uint32_t current_lost_frames_; | 193 uint32_t current_lost_frames_; |
194 | 194 |
195 // Stores the timestamp of the previous audio buffer requested by the OS. | 195 // Stores the timestamp of the previous audio buffer requested by the OS. |
(...skipping 16 matching lines...) Expand all Loading... | |
212 // Used to make sure control functions (Start(), Stop() etc) are called on the | 212 // Used to make sure control functions (Start(), Stop() etc) are called on the |
213 // right thread. | 213 // right thread. |
214 base::ThreadChecker thread_checker_; | 214 base::ThreadChecker thread_checker_; |
215 | 215 |
216 DISALLOW_COPY_AND_ASSIGN(AUHALStream); | 216 DISALLOW_COPY_AND_ASSIGN(AUHALStream); |
217 }; | 217 }; |
218 | 218 |
219 } // namespace media | 219 } // namespace media |
220 | 220 |
221 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ | 221 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ |
OLD | NEW |