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

Unified Diff: webrtc/common_audio/smoothing_filter.cc

Issue 2503713003: Smooth BWE and pass it to Audio Network Adaptor. (Closed)
Patch Set: Rebased 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
« no previous file with comments | « webrtc/common_audio/smoothing_filter.h ('k') | webrtc/voice_engine/channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/smoothing_filter.cc
diff --git a/webrtc/common_audio/smoothing_filter.cc b/webrtc/common_audio/smoothing_filter.cc
index 1cf9580d2adfeea7821b36e759651b8b2cd58281..ff79ab8799e9de332ff324152e97c43947837e6a 100644
--- a/webrtc/common_audio/smoothing_filter.cc
+++ b/webrtc/common_audio/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_));
+}
+
} // namespace webrtc
« no previous file with comments | « webrtc/common_audio/smoothing_filter.h ('k') | webrtc/voice_engine/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698