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

Unified Diff: webrtc/modules/audio_processing/echo_cancellation_impl.cc

Issue 1887003002: Added support in the AEC for refined filter adaptation. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Corrected the issue with the missing const specifier in the header file 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/echo_cancellation_impl.cc
diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.cc b/webrtc/modules/audio_processing/echo_cancellation_impl.cc
index 810ea8965542a146de325fc144376c98993dd6a0..21a300403fc8cfc7577c8a54e4bd9c150a012268 100644
--- a/webrtc/modules/audio_processing/echo_cancellation_impl.cc
+++ b/webrtc/modules/audio_processing/echo_cancellation_impl.cc
@@ -413,6 +413,11 @@ bool EchoCancellationImpl::is_aec3_enabled() const {
return aec3_enabled_;
}
+bool EchoCancellationImpl::is_refined_adaptive_filter_enabled() const {
+ rtc::CritScope cs(crit_capture_);
+ return refined_adaptive_filter_enabled_;
+}
+
bool EchoCancellationImpl::is_extended_filter_enabled() const {
rtc::CritScope cs(crit_capture_);
return extended_filter_enabled_;
@@ -529,6 +534,8 @@ void EchoCancellationImpl::SetExtraOptions(const Config& config) {
rtc::CritScope cs(crit_capture_);
extended_filter_enabled_ = config.Get<ExtendedFilter>().enabled;
delay_agnostic_enabled_ = config.Get<DelayAgnostic>().enabled;
+ refined_adaptive_filter_enabled_ =
+ config.Get<RefinedAdaptiveFilter>().enabled;
aec3_enabled_ = config.Get<EchoCanceller3>().enabled;
}
Configure();
@@ -551,6 +558,9 @@ int EchoCancellationImpl::Configure() {
delay_agnostic_enabled_ ? 1 : 0);
WebRtcAec_enable_aec3(WebRtcAec_aec_core(canceller->state()),
aec3_enabled_ ? 1 : 0);
+ WebRtcAec_enable_refined_adaptive_filter(
+ WebRtcAec_aec_core(canceller->state()),
+ refined_adaptive_filter_enabled_);
const int handle_error = WebRtcAec_set_config(canceller->state(), config);
if (handle_error != AudioProcessing::kNoError) {
error = AudioProcessing::kNoError;

Powered by Google App Engine
This is Rietveld 408576698