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

Side by Side Diff: webrtc/modules/audio_processing/aec3/block_processor.cc

Issue 3007833002: Further utilizing the AEC3 config struct for constants (Closed)
Patch Set: Created 3 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 #include "webrtc/modules/audio_processing/aec3/block_processor.h" 10 #include "webrtc/modules/audio_processing/aec3/block_processor.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 175
176 } // namespace 176 } // namespace
177 177
178 BlockProcessor* BlockProcessor::Create( 178 BlockProcessor* BlockProcessor::Create(
179 const AudioProcessing::Config::EchoCanceller3& config, 179 const AudioProcessing::Config::EchoCanceller3& config,
180 int sample_rate_hz) { 180 int sample_rate_hz) {
181 std::unique_ptr<RenderDelayBuffer> render_buffer( 181 std::unique_ptr<RenderDelayBuffer> render_buffer(
182 RenderDelayBuffer::Create(NumBandsForRate(sample_rate_hz))); 182 RenderDelayBuffer::Create(NumBandsForRate(sample_rate_hz)));
183 std::unique_ptr<RenderDelayController> delay_controller( 183 std::unique_ptr<RenderDelayController> delay_controller(
184 RenderDelayController::Create(sample_rate_hz)); 184 RenderDelayController::Create(config, sample_rate_hz));
185 std::unique_ptr<EchoRemover> echo_remover( 185 std::unique_ptr<EchoRemover> echo_remover(
186 EchoRemover::Create(config, sample_rate_hz)); 186 EchoRemover::Create(config, sample_rate_hz));
187 return Create(config, sample_rate_hz, std::move(render_buffer), 187 return Create(config, sample_rate_hz, std::move(render_buffer),
188 std::move(delay_controller), std::move(echo_remover)); 188 std::move(delay_controller), std::move(echo_remover));
189 } 189 }
190 190
191 BlockProcessor* BlockProcessor::Create( 191 BlockProcessor* BlockProcessor::Create(
192 const AudioProcessing::Config::EchoCanceller3& config, 192 const AudioProcessing::Config::EchoCanceller3& config,
193 int sample_rate_hz, 193 int sample_rate_hz,
194 std::unique_ptr<RenderDelayBuffer> render_buffer) { 194 std::unique_ptr<RenderDelayBuffer> render_buffer) {
195 std::unique_ptr<RenderDelayController> delay_controller( 195 std::unique_ptr<RenderDelayController> delay_controller(
196 RenderDelayController::Create(sample_rate_hz)); 196 RenderDelayController::Create(config, sample_rate_hz));
197 std::unique_ptr<EchoRemover> echo_remover( 197 std::unique_ptr<EchoRemover> echo_remover(
198 EchoRemover::Create(config, sample_rate_hz)); 198 EchoRemover::Create(config, sample_rate_hz));
199 return Create(config, sample_rate_hz, std::move(render_buffer), 199 return Create(config, sample_rate_hz, std::move(render_buffer),
200 std::move(delay_controller), std::move(echo_remover)); 200 std::move(delay_controller), std::move(echo_remover));
201 } 201 }
202 202
203 BlockProcessor* BlockProcessor::Create( 203 BlockProcessor* BlockProcessor::Create(
204 const AudioProcessing::Config::EchoCanceller3& config, 204 const AudioProcessing::Config::EchoCanceller3& config,
205 int sample_rate_hz, 205 int sample_rate_hz,
206 std::unique_ptr<RenderDelayBuffer> render_buffer, 206 std::unique_ptr<RenderDelayBuffer> render_buffer,
207 std::unique_ptr<RenderDelayController> delay_controller, 207 std::unique_ptr<RenderDelayController> delay_controller,
208 std::unique_ptr<EchoRemover> echo_remover) { 208 std::unique_ptr<EchoRemover> echo_remover) {
209 return new BlockProcessorImpl(sample_rate_hz, std::move(render_buffer), 209 return new BlockProcessorImpl(sample_rate_hz, std::move(render_buffer),
210 std::move(delay_controller), 210 std::move(delay_controller),
211 std::move(echo_remover)); 211 std::move(echo_remover));
212 } 212 }
213 213
214 } // namespace webrtc 214 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/aec3/aec_state.cc ('k') | webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698