Index: webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc |
diff --git a/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc b/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc |
index 3734ed80e0fb26de07b1bda503fe4db6326bb5ee..4a0a935620db25118f109d88c4d6689881e44a45 100644 |
--- a/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc |
+++ b/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc |
@@ -23,6 +23,12 @@ MatchedFilterLagAggregator::MatchedFilterLagAggregator( |
MatchedFilterLagAggregator::~MatchedFilterLagAggregator() = default; |
+void MatchedFilterLagAggregator::Reset() { |
+ candidate_ = 0; |
+ candidate_counter_ = 0; |
+ std::fill(lag_updates_in_a_row_.begin(), lag_updates_in_a_row_.end(), 0.f); |
+} |
+ |
rtc::Optional<size_t> MatchedFilterLagAggregator::Aggregate( |
rtc::ArrayView<const MatchedFilter::LagEstimate> lag_estimates) { |
RTC_DCHECK_EQ(lag_updates_in_a_row_.size(), lag_estimates.size()); |