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 // AudioRendererAlgorithm buffers and transforms audio data. The owner of | 5 // AudioRendererAlgorithm buffers and transforms audio data. The owner of |
6 // this object provides audio data to the object through EnqueueBuffer() and | 6 // this object provides audio data to the object through EnqueueBuffer() and |
7 // requests data from the buffer via FillBuffer(). | 7 // requests data from the buffer via FillBuffer(). |
8 // | 8 // |
9 // This class is *not* thread-safe. Calls to enqueue and retrieve data must be | 9 // This class is *not* thread-safe. Calls to enqueue and retrieve data must be |
10 // locked if called from multiple threads. | 10 // locked if called from multiple threads. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // after a |channel_mask_| change. May be called at anytime after a channel | 146 // after a |channel_mask_| change. May be called at anytime after a channel |
147 // mask has been specified. | 147 // mask has been specified. |
148 void CreateSearchWrappers(); | 148 void CreateSearchWrappers(); |
149 | 149 |
150 // Number of channels in audio stream. | 150 // Number of channels in audio stream. |
151 int channels_; | 151 int channels_; |
152 | 152 |
153 // Sample rate of audio stream. | 153 // Sample rate of audio stream. |
154 int samples_per_second_; | 154 int samples_per_second_; |
155 | 155 |
| 156 // Is compressed audio output |
| 157 bool is_bitstream_format_; |
| 158 |
156 // Buffered audio data. | 159 // Buffered audio data. |
157 AudioBufferQueue audio_buffer_; | 160 AudioBufferQueue audio_buffer_; |
158 | 161 |
159 // If muted, keep track of partial frames that should have been skipped over. | 162 // If muted, keep track of partial frames that should have been skipped over. |
160 double muted_partial_frame_; | 163 double muted_partial_frame_; |
161 | 164 |
162 // How many frames to have in the queue before we report the queue is full. | 165 // How many frames to have in the queue before we report the queue is full. |
163 int capacity_; | 166 int capacity_; |
164 | 167 |
165 // Book keeping of the current time of generated audio, in frames. This | 168 // Book keeping of the current time of generated audio, in frames. This |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // The initial and maximum capacity calculated by Initialize(). | 239 // The initial and maximum capacity calculated by Initialize(). |
237 int initial_capacity_; | 240 int initial_capacity_; |
238 int max_capacity_; | 241 int max_capacity_; |
239 | 242 |
240 DISALLOW_COPY_AND_ASSIGN(AudioRendererAlgorithm); | 243 DISALLOW_COPY_AND_ASSIGN(AudioRendererAlgorithm); |
241 }; | 244 }; |
242 | 245 |
243 } // namespace media | 246 } // namespace media |
244 | 247 |
245 #endif // MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_ | 248 #endif // MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_ |
OLD | NEW |