Index: webrtc/base/smoothing_filter.cc |
diff --git a/webrtc/base/smoothing_filter.cc b/webrtc/base/smoothing_filter.cc |
index e26129fd6d9bc1300cf170d2a41d147b29d398e6..6b5d0811dd59bdc27d9a87dbc475bb47365fda22 100644 |
--- a/webrtc/base/smoothing_filter.cc |
+++ b/webrtc/base/smoothing_filter.cc |
@@ -59,4 +59,9 @@ rtc::Optional<float> SmoothingFilterImpl::GetAverage() const { |
: rtc::Optional<float>(value); |
} |
+void SmoothingFilterImpl::SetTimeConstantMs(int time_constant_ms) { |
+ time_constant_ms_ = time_constant_ms; |
+ filter_.UpdateBase(exp(1.0f / time_constant_ms_)); |
minyue-webrtc
2016/11/21 09:18:24
is this needed. Don't we always decide to updateBa
michaelt
2016/11/21 09:48:32
Just in the case the filter is not initialized.
minyue-webrtc
2016/11/21 10:59:01
I see... BTW, you mean "it IS initialized" don't y
|
+} |
+ |
} // namespace webrtc |