diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-10-23 22:55:56 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-10-23 22:55:56 +0000 |
commit | dc987e9df842732336c529201694f10054d401cb (patch) | |
tree | 5efce2b8599e901e3494bfdb9a6e3c2634ec89c9 /src/pulsecore/time-smoother.h | |
parent | 9464b9b45f4675bb668960734c335e4404d4d49e (diff) |
add better time interpolator: use linear regression to determine gradient from
measurements, predict a short distance ahead, and smoothen estimation function
with 3rd degree spline interpolation.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1949 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/time-smoother.h')
-rw-r--r-- | src/pulsecore/time-smoother.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/pulsecore/time-smoother.h b/src/pulsecore/time-smoother.h new file mode 100644 index 00000000..038b7ae4 --- /dev/null +++ b/src/pulsecore/time-smoother.h @@ -0,0 +1,37 @@ +#ifndef foopulsetimesmootherhfoo +#define foopulsetimesmootherhfoo + +/* $Id$ */ + +/*** + This file is part of PulseAudio. + + Copyright 2007 Lennart Poettering + + PulseAudio is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + PulseAudio is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with PulseAudio; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. +***/ + +#include <pulsecore/macro.h> +#include <pulse/sample.h> + +typedef struct pa_smoother pa_smoother; + +pa_smoother* pa_smoother_new(pa_usec_t adjust_x, pa_usec_t history_x, pa_bool_t monotonic); + +void pa_smoother_put(pa_smoother *s, pa_usec_t x, pa_usec_t y); +pa_usec_t pa_smoother_get(pa_smoother *s, pa_usec_t x); + +#endif |