add new function pa_smoother_reset()
authorLennart Poettering <lennart@poettering.net>
Fri, 20 Jun 2008 20:17:40 +0000 (22:17 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 20 Jun 2008 20:17:40 +0000 (22:17 +0200)
src/pulsecore/time-smoother.c
src/pulsecore/time-smoother.h

index 2723edb..fe5a4f1 100644 (file)
@@ -449,3 +449,11 @@ pa_usec_t pa_smoother_translate(pa_smoother *s, pa_usec_t x, pa_usec_t y_delay)
 
     return (pa_usec_t) ((double) y_delay / nde);
 }
+
+void pa_smoother_reset(pa_smoother *s) {
+    pa_assert(s);
+
+    s->n_history = 0;
+    s->abc_valid = FALSE;
+
+}
index 8f450d0..2051e64 100644 (file)
@@ -44,4 +44,6 @@ void pa_smoother_set_time_offset(pa_smoother *s, pa_usec_t x_offset);
 void pa_smoother_pause(pa_smoother *s, pa_usec_t x);
 void pa_smoother_resume(pa_smoother *s, pa_usec_t x);
 
+void pa_smoother_reset(pa_smoother *s);
+
 #endif