summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/time-smoother.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-05-15 23:34:41 +0000
committerLennart Poettering <lennart@poettering.net>2008-05-15 23:34:41 +0000
commit045c1d602dcba57868845ba3270510593c39480f (patch)
treeb3d61f180e6fa40f97a80aa3e46d7c910ed7c2a6 /src/pulsecore/time-smoother.h
parent91f092eadcc5e9075e04ae42df11de28ef5047a8 (diff)
merge glitch-free branch back into trunk
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/time-smoother.h')
-rw-r--r--src/pulsecore/time-smoother.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pulsecore/time-smoother.h b/src/pulsecore/time-smoother.h
index 8b8512e2..b301b48c 100644
--- a/src/pulsecore/time-smoother.h
+++ b/src/pulsecore/time-smoother.h
@@ -29,13 +29,19 @@
typedef struct pa_smoother pa_smoother;
-pa_smoother* pa_smoother_new(pa_usec_t adjust_time, pa_usec_t history_time, pa_bool_t monotonic);
+pa_smoother* pa_smoother_new(pa_usec_t x_adjust_time, pa_usec_t x_history_time, pa_bool_t monotonic, unsigned min_history);
void pa_smoother_free(pa_smoother* s);
+/* Adds a new value to our dataset. x = local/system time, y = remote time */
void pa_smoother_put(pa_smoother *s, pa_usec_t x, pa_usec_t y);
+
+/* Returns an interpolated value based on the dataset. x = local/system time, return value = remote time */
pa_usec_t pa_smoother_get(pa_smoother *s, pa_usec_t x);
-void pa_smoother_set_time_offset(pa_smoother *s, pa_usec_t offset);
+/* Translates a time span from the remote time domain to the local one. x = local/system time when to estimate, y_delay = remote time span */
+pa_usec_t pa_smoother_translate(pa_smoother *s, pa_usec_t x, pa_usec_t y_delay);
+
+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);