Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Side by Side Diff: media/filters/audio_renderer_algorithm.h

Issue 1907973003: media: Move audio_parameters and audio_point to media/base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/cast/test/receiver.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_FILTERS_AUDIO_RENDERER_ALGORITHM_H_
22 #define MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_ 22 #define MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_
23 23
24 #include <stdint.h> 24 #include <stdint.h>
25 25
26 #include <memory> 26 #include <memory>
27 27
28 #include "base/macros.h" 28 #include "base/macros.h"
29 #include "base/memory/ref_counted.h" 29 #include "base/memory/ref_counted.h"
30 #include "media/audio/audio_parameters.h"
31 #include "media/base/audio_buffer.h" 30 #include "media/base/audio_buffer.h"
32 #include "media/base/audio_buffer_queue.h" 31 #include "media/base/audio_buffer_queue.h"
32 #include "media/base/audio_parameters.h"
33 33
34 namespace media { 34 namespace media {
35 35
36 class AudioBus; 36 class AudioBus;
37 37
38 class MEDIA_EXPORT AudioRendererAlgorithm { 38 class MEDIA_EXPORT AudioRendererAlgorithm {
39 public: 39 public:
40 AudioRendererAlgorithm(); 40 AudioRendererAlgorithm();
41 ~AudioRendererAlgorithm(); 41 ~AudioRendererAlgorithm();
42 42
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // searched for a block (|optimal_block_|) that is most similar to 206 // searched for a block (|optimal_block_|) that is most similar to
207 // |target_block_|. 207 // |target_block_|.
208 std::unique_ptr<AudioBus> target_block_; 208 std::unique_ptr<AudioBus> target_block_;
209 209
210 DISALLOW_COPY_AND_ASSIGN(AudioRendererAlgorithm); 210 DISALLOW_COPY_AND_ASSIGN(AudioRendererAlgorithm);
211 }; 211 };
212 212
213 } // namespace media 213 } // namespace media
214 214
215 #endif // MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_ 215 #endif // MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_
OLDNEW
« no previous file with comments | « media/cast/test/receiver.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698