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

Unified Diff: webrtc/base/smoothing_filter.cc

Issue 2503713003: Smooth BWE and pass it to Audio Network Adaptor. (Closed)
Patch Set: Response to comments. Created 4 years, 1 month 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/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

Powered by Google App Engine
This is Rietveld 408576698