Index: webrtc/modules/audio_processing/residual_echo_detector.h |
diff --git a/webrtc/modules/audio_processing/residual_echo_detector.h b/webrtc/modules/audio_processing/residual_echo_detector.h |
index e8f51cda3e2316be4882f76af3a1fadee472477c..ba0d0d3c2843aa5f61a6ba94677d678ae8e8d8d8 100644 |
--- a/webrtc/modules/audio_processing/residual_echo_detector.h |
+++ b/webrtc/modules/audio_processing/residual_echo_detector.h |
@@ -16,6 +16,7 @@ |
#include "webrtc/base/array_view.h" |
#include "webrtc/modules/audio_processing/echo_detector/circular_buffer.h" |
#include "webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h" |
+#include "webrtc/modules/audio_processing/echo_detector/moving_max.h" |
#include "webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h" |
namespace webrtc { |
@@ -46,6 +47,10 @@ class ResidualEchoDetector { |
// This function should be called while holding the capture lock. |
float echo_likelihood() const { return echo_likelihood_; } |
+ float echo_likelihood_recent_max() const { |
+ return recent_likelihood_max_.max(); |
+ } |
+ |
private: |
// Keep track if the |Process| function has been previously called. |
bool first_process_call_ = true; |
@@ -76,6 +81,7 @@ class ResidualEchoDetector { |
float echo_likelihood_ = 0.f; |
// Reliability of the current likelihood. |
float reliability_ = 0.f; |
+ MovingMax recent_likelihood_max_; |
}; |
} // namespace webrtc |