diff options
-rw-r--r-- | src/pulsecore/time-smoother.c | 8 | ||||
-rw-r--r-- | src/pulsecore/time-smoother.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/pulsecore/time-smoother.c b/src/pulsecore/time-smoother.c index 2723edba..fe5a4f18 100644 --- a/src/pulsecore/time-smoother.c +++ b/src/pulsecore/time-smoother.c @@ -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; + +} diff --git a/src/pulsecore/time-smoother.h b/src/pulsecore/time-smoother.h index 8f450d05..2051e640 100644 --- a/src/pulsecore/time-smoother.h +++ b/src/pulsecore/time-smoother.h @@ -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 |