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. |
11 // | 11 // |
12 // AudioRendererAlgorithm uses the Waveform Similarity Overlap and Add (WSOLA) | 12 // AudioRendererAlgorithm uses the Waveform Similarity Overlap and Add (WSOLA) |
13 // algorithm to stretch or compress audio data to meet playback speeds less than | 13 // algorithm to stretch or compress audio data to meet playback speeds less than |
14 // or greater than the natural playback of the audio stream. The algorithm | 14 // or greater than the natural playback of the audio stream. The algorithm |
15 // preserves local properties of the audio, therefore, pitch and harmonics are | 15 // preserves local properties of the audio, therefore, pitch and harmonics are |
16 // are preserved. See audio_renderer_algorith.cc for a more elaborate | 16 // are preserved. See audio_renderer_algorith.cc for a more elaborate |
17 // description of the algorithm. | 17 // description of the algorithm. |
18 // | 18 // |
19 // Audio at very low or very high playback rates are muted to preserve quality. | 19 // Audio at very low or very high playback rates are muted to preserve quality. |
20 | 20 |
21 #ifndef MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_ | 21 #ifndef MEDIA_RENDERERS_AUDIO_RENDERER_ALGORITHM_H_ |
DaleCurtis
2015/02/23 19:46:47
Hmm, this is an implementation detail of the Audio
| |
22 #define MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_ | 22 #define MEDIA_RENDERERS_AUDIO_RENDERER_ALGORITHM_H_ |
23 | 23 |
24 #include "base/memory/ref_counted.h" | 24 #include "base/memory/ref_counted.h" |
25 #include "base/memory/scoped_ptr.h" | 25 #include "base/memory/scoped_ptr.h" |
26 #include "media/audio/audio_parameters.h" | 26 #include "media/audio/audio_parameters.h" |
27 #include "media/base/audio_buffer.h" | 27 #include "media/base/audio_buffer.h" |
28 #include "media/base/audio_buffer_queue.h" | 28 #include "media/base/audio_buffer_queue.h" |
29 | 29 |
30 namespace media { | 30 namespace media { |
31 | 31 |
32 class AudioBus; | 32 class AudioBus; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
195 // Stores the target block, denoted as |target| above. |search_block_| is | 195 // Stores the target block, denoted as |target| above. |search_block_| is |
196 // searched for a block (|optimal_block_|) that is most similar to | 196 // searched for a block (|optimal_block_|) that is most similar to |
197 // |target_block_|. | 197 // |target_block_|. |
198 scoped_ptr<AudioBus> target_block_; | 198 scoped_ptr<AudioBus> target_block_; |
199 | 199 |
200 DISALLOW_COPY_AND_ASSIGN(AudioRendererAlgorithm); | 200 DISALLOW_COPY_AND_ASSIGN(AudioRendererAlgorithm); |
201 }; | 201 }; |
202 | 202 |
203 } // namespace media | 203 } // namespace media |
204 | 204 |
205 #endif // MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_ | 205 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_ALGORITHM_H_ |
OLD | NEW |