Index: webrtc/common_audio/smoothing_filter.cc |
diff --git a/webrtc/common_audio/smoothing_filter.cc b/webrtc/common_audio/smoothing_filter.cc |
index 2ab25981f1e3af4b4777026f212591094f75a78c..f0441e5d943259dd86b9ab6ae6d00de932bf1906 100644 |
--- a/webrtc/common_audio/smoothing_filter.cc |
+++ b/webrtc/common_audio/smoothing_filter.cc |
@@ -111,8 +111,6 @@ void SmoothingFilterImpl::ExtrapolateLastSample(int64_t time_ms) { |
last_state_time_ms_ = time_ms; |
} |
-} // namespace webrtc |
- |
// Appendix: derivation of extrapolation during initialization phase. |
// (LaTeX syntax) |
// Assuming |
@@ -140,3 +138,22 @@ void SmoothingFilterImpl::ExtrapolateLastSample(int64_t time_ms) { |
// \frac{\gamma^m - \gamma^n}{1 - \gamma} |
// &= \frac{T^\frac{T-m}{T} - T^\frac{T-n}{T}}{T - T^{1-\frac{1}{T}}} |
// \end{align} |
+ |
+NullSmoothingFilter::NullSmoothingFilter() = default; |
+ |
+NullSmoothingFilter::~NullSmoothingFilter() = default; |
+ |
+void NullSmoothingFilter::AddSample(float sample) { |
+ last_sample_ = rtc::Optional<float>(sample); |
+} |
+ |
+rtc::Optional<float> NullSmoothingFilter::GetAverage() { |
+ return last_sample_; |
+} |
+ |
+bool NullSmoothingFilter::SetTimeConstantMs(int time_constant_ms) { |
+ RTC_NOTREACHED(); |
+ return false; |
+} |
+ |
+} // namespace webrtc |