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

Unified Diff: webrtc/modules/audio_processing/aec3/echo_remover.cc

Issue 2967603002: Added the ability to adjust the AEC3 performance for large rooms (Closed)
Patch Set: Changes in response to reviewer commments Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/aec3/echo_remover.cc
diff --git a/webrtc/modules/audio_processing/aec3/echo_remover.cc b/webrtc/modules/audio_processing/aec3/echo_remover.cc
index 973725108fbf475fcc48c4d58c2b2ae1dbf79da7..0c6184e3bb76cc3ef2e86711169740eaf5384c34 100644
--- a/webrtc/modules/audio_processing/aec3/echo_remover.cc
+++ b/webrtc/modules/audio_processing/aec3/echo_remover.cc
@@ -49,7 +49,9 @@ void LinearEchoPower(const FftData& E,
// Class for removing the echo from the capture signal.
class EchoRemoverImpl final : public EchoRemover {
public:
- explicit EchoRemoverImpl(int sample_rate_hz);
+ explicit EchoRemoverImpl(
+ const AudioProcessing::Config::EchoCanceller3& config,
+ int sample_rate_hz);
~EchoRemoverImpl() override;
// Removes the echo from a block of samples from the capture signal. The
@@ -90,7 +92,9 @@ class EchoRemoverImpl final : public EchoRemover {
int EchoRemoverImpl::instance_count_ = 0;
-EchoRemoverImpl::EchoRemoverImpl(int sample_rate_hz)
+EchoRemoverImpl::EchoRemoverImpl(
+ const AudioProcessing::Config::EchoCanceller3& config,
+ int sample_rate_hz)
: fft_(),
data_dumper_(
new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))),
@@ -99,7 +103,8 @@ EchoRemoverImpl::EchoRemoverImpl(int sample_rate_hz)
subtractor_(data_dumper_.get(), optimization_),
suppression_gain_(optimization_),
cng_(optimization_),
- suppression_filter_(sample_rate_hz_) {
+ suppression_filter_(sample_rate_hz_),
+ aec_state_(config.echo_decay) {
RTC_DCHECK(ValidFullBandRate(sample_rate_hz));
}
@@ -221,8 +226,10 @@ void EchoRemoverImpl::ProcessCapture(
} // namespace
-EchoRemover* EchoRemover::Create(int sample_rate_hz) {
- return new EchoRemoverImpl(sample_rate_hz);
+EchoRemover* EchoRemover::Create(
+ const AudioProcessing::Config::EchoCanceller3& config,
+ int sample_rate_hz) {
+ return new EchoRemoverImpl(config, sample_rate_hz);
}
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698