diff options
Diffstat (limited to 'modules/audio_processing/aec3/echo_path_delay_estimator.cc')
-rw-r--r-- | modules/audio_processing/aec3/echo_path_delay_estimator.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/audio_processing/aec3/echo_path_delay_estimator.cc b/modules/audio_processing/aec3/echo_path_delay_estimator.cc index e64c4493f6..fc83ca2f89 100644 --- a/modules/audio_processing/aec3/echo_path_delay_estimator.cc +++ b/modules/audio_processing/aec3/echo_path_delay_estimator.cc @@ -43,10 +43,11 @@ EchoPathDelayEstimator::EchoPathDelayEstimator( : config.render_levels.poor_excitation_render_limit, config.delay.delay_estimate_smoothing, config.delay.delay_estimate_smoothing_delay_found, - config.delay.delay_candidate_detection_threshold), + config.delay.delay_candidate_detection_threshold, + config.delay.detect_pre_echo), matched_filter_lag_aggregator_(data_dumper_, matched_filter_.GetMaxFilterLag(), - config.delay.delay_selection_thresholds) { + config.delay) { RTC_DCHECK(data_dumper); RTC_DCHECK(down_sampling_factor_ > 0); } @@ -75,13 +76,14 @@ absl::optional<DelayEstimate> EchoPathDelayEstimator::EstimateDelay( absl::optional<DelayEstimate> aggregated_matched_filter_lag = matched_filter_lag_aggregator_.Aggregate( - matched_filter_.GetLagEstimates()); + matched_filter_.GetBestLagEstimate()); // Run clockdrift detection. if (aggregated_matched_filter_lag && (*aggregated_matched_filter_lag).quality == DelayEstimate::Quality::kRefined) - clockdrift_detector_.Update((*aggregated_matched_filter_lag).delay); + clockdrift_detector_.Update( + matched_filter_lag_aggregator_.GetDelayAtHighestPeak()); // TODO(peah): Move this logging outside of this class once EchoCanceller3 // development is done. |