default: esd is obsolete, hence don't load it anymore by default
[pulseaudio-mirror.git] / src / pulsecore / time-smoother.h
blob63d33e48fc2099f3fb5c035f1b6d6d0c3bfeeccf
1 #ifndef foopulsetimesmootherhfoo
2 #define foopulsetimesmootherhfoo
4 /***
5 This file is part of PulseAudio.
7 Copyright 2007 Lennart Poettering
9 PulseAudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation; either version 2.1 of the
12 License, or (at your option) any later version.
14 PulseAudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with PulseAudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 USA.
23 ***/
25 #include <pulsecore/macro.h>
26 #include <pulse/sample.h>
28 typedef struct pa_smoother pa_smoother;
30 pa_smoother* pa_smoother_new(
31 pa_usec_t x_adjust_time,
32 pa_usec_t x_history_time,
33 pa_bool_t monotonic,
34 pa_bool_t smoothing,
35 unsigned min_history,
36 pa_usec_t x_offset,
37 pa_bool_t paused);
39 void pa_smoother_free(pa_smoother* s);
41 /* Adds a new value to our dataset. x = local/system time, y = remote time */
42 void pa_smoother_put(pa_smoother *s, pa_usec_t x, pa_usec_t y);
44 /* Returns an interpolated value based on the dataset. x = local/system time, return value = remote time */
45 pa_usec_t pa_smoother_get(pa_smoother *s, pa_usec_t x);
47 /* 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 */
48 pa_usec_t pa_smoother_translate(pa_smoother *s, pa_usec_t x, pa_usec_t y_delay);
50 void pa_smoother_set_time_offset(pa_smoother *s, pa_usec_t x_offset);
52 void pa_smoother_pause(pa_smoother *s, pa_usec_t x);
53 void pa_smoother_resume(pa_smoother *s, pa_usec_t x, pa_bool_t abrupt);
55 void pa_smoother_reset(pa_smoother *s, pa_usec_t time_offset, pa_bool_t paused);
57 void pa_smoother_fix_now(pa_smoother *s);
59 #endif