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

Side by Side Diff: webrtc/modules/audio_processing/audio_buffer.h

Issue 2053773002: Keep track of the user-facing number of channels in a ChannelBuffer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebasing Created 4 years, 5 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 | « webrtc/modules/BUILD.gn ('k') | webrtc/modules/audio_processing/audio_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 void CopyFrom(const float* const* data, const StreamConfig& stream_config); 116 void CopyFrom(const float* const* data, const StreamConfig& stream_config);
117 void CopyTo(const StreamConfig& stream_config, float* const* data); 117 void CopyTo(const StreamConfig& stream_config, float* const* data);
118 void CopyLowPassToReference(); 118 void CopyLowPassToReference();
119 119
120 // Splits the signal into different bands. 120 // Splits the signal into different bands.
121 void SplitIntoFrequencyBands(); 121 void SplitIntoFrequencyBands();
122 // Recombine the different bands into one signal. 122 // Recombine the different bands into one signal.
123 void MergeFrequencyBands(); 123 void MergeFrequencyBands();
124 124
125 private: 125 private:
126 FRIEND_TEST_ALL_PREFIXES(AudioBufferTest,
127 SetNumChannelsSetsChannelBuffersNumChannels);
126 // Called from DeinterleaveFrom() and CopyFrom(). 128 // Called from DeinterleaveFrom() and CopyFrom().
127 void InitForNewData(); 129 void InitForNewData();
128 130
129 // The audio is passed into DeinterleaveFrom() or CopyFrom() with input 131 // The audio is passed into DeinterleaveFrom() or CopyFrom() with input
130 // format (samples per channel and number of channels). 132 // format (samples per channel and number of channels).
131 const size_t input_num_frames_; 133 const size_t input_num_frames_;
132 const size_t num_input_channels_; 134 const size_t num_input_channels_;
133 // The audio is stored by DeinterleaveFrom() or CopyFrom() with processing 135 // The audio is stored by DeinterleaveFrom() or CopyFrom() with processing
134 // format. 136 // format.
135 const size_t proc_num_frames_; 137 const size_t proc_num_frames_;
(...skipping 19 matching lines...) Expand all
155 std::unique_ptr<IFChannelBuffer> input_buffer_; 157 std::unique_ptr<IFChannelBuffer> input_buffer_;
156 std::unique_ptr<IFChannelBuffer> output_buffer_; 158 std::unique_ptr<IFChannelBuffer> output_buffer_;
157 std::unique_ptr<ChannelBuffer<float> > process_buffer_; 159 std::unique_ptr<ChannelBuffer<float> > process_buffer_;
158 std::vector<std::unique_ptr<PushSincResampler>> input_resamplers_; 160 std::vector<std::unique_ptr<PushSincResampler>> input_resamplers_;
159 std::vector<std::unique_ptr<PushSincResampler>> output_resamplers_; 161 std::vector<std::unique_ptr<PushSincResampler>> output_resamplers_;
160 }; 162 };
161 163
162 } // namespace webrtc 164 } // namespace webrtc
163 165
164 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_BUFFER_H_ 166 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_BUFFER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/BUILD.gn ('k') | webrtc/modules/audio_processing/audio_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698