]> code.delx.au - pulseaudio/commitdiff
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 2723edbad51feee873dc4f875f3473dcac6900f5..fe5a4f18084bb05e1663a610905ecdc7310c7bc6 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 8f450d055d18433ad8c3d7d6c52dfadbbf04e4c7..2051e64068d51f249a3e1100e96c74a715f26b14 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