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 // AudioConverter is a complete mixing, resampling, buffering, and channel | 5 // AudioConverter is a complete mixing, resampling, buffering, and channel |
6 // mixing solution for converting data from one set of AudioParameters to | 6 // mixing solution for converting data from one set of AudioParameters to |
7 // another. | 7 // another. |
8 // | 8 // |
9 // For efficiency, pieces are only invoked when necessary; i.e., | 9 // For efficiency, pieces are only invoked when necessary; i.e., |
10 // - The resampler is only used if sample rates differ. | 10 // - The resampler is only used if sample rates differ. |
11 // - The FIFO is only used if buffer sizes differ. | 11 // - The FIFO is only used if buffer sizes differ. |
12 // - The channel mixer is only used if channel layouts differ. | 12 // - The channel mixer is only used if channel layouts differ. |
13 // | 13 // |
14 // Additionally, since resampling is the most expensive operation, input mixing | 14 // Additionally, since resampling is the most expensive operation, input mixing |
15 // and channel down mixing are done prior to resampling. Likewise, channel up | 15 // and channel down mixing are done prior to resampling. Likewise, channel up |
16 // mixing is performed after resampling. | 16 // mixing is performed after resampling. |
17 | 17 |
18 #ifndef MEDIA_BASE_AUDIO_CONVERTER_H_ | 18 #ifndef MEDIA_BASE_AUDIO_CONVERTER_H_ |
19 #define MEDIA_BASE_AUDIO_CONVERTER_H_ | 19 #define MEDIA_BASE_AUDIO_CONVERTER_H_ |
20 | 20 |
21 #include <list> | 21 #include <list> |
22 | 22 |
23 #include "base/callback.h" | 23 #include "base/callback.h" |
24 #include "base/memory/scoped_ptr.h" | 24 #include "base/memory/scoped_ptr.h" |
25 #include "base/time.h" | 25 #include "base/time/time.h" |
26 #include "media/audio/audio_parameters.h" | 26 #include "media/audio/audio_parameters.h" |
27 #include "media/base/media_export.h" | 27 #include "media/base/media_export.h" |
28 | 28 |
29 namespace media { | 29 namespace media { |
30 | 30 |
31 class AudioBus; | 31 class AudioBus; |
32 class AudioPullFifo; | 32 class AudioPullFifo; |
33 class ChannelMixer; | 33 class ChannelMixer; |
34 class MultiChannelResampler; | 34 class MultiChannelResampler; |
35 | 35 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // value from the input AudioParameters class. Preserved to recreate internal | 129 // value from the input AudioParameters class. Preserved to recreate internal |
130 // AudioBus structures on demand in response to varying frame size requests. | 130 // AudioBus structures on demand in response to varying frame size requests. |
131 const int input_channel_count_; | 131 const int input_channel_count_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(AudioConverter); | 133 DISALLOW_COPY_AND_ASSIGN(AudioConverter); |
134 }; | 134 }; |
135 | 135 |
136 } // namespace media | 136 } // namespace media |
137 | 137 |
138 #endif // MEDIA_BASE_AUDIO_CONVERTER_H_ | 138 #endif // MEDIA_BASE_AUDIO_CONVERTER_H_ |
OLD | NEW |