mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
add missing pa_smoother destructor
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1956 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
b4bb747ba7
commit
c4d9a2bf85
3 changed files with 10 additions and 0 deletions
|
|
@ -108,6 +108,12 @@ pa_smoother* pa_smoother_new(pa_usec_t adjust_time, pa_usec_t history_time, pa_b
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pa_smoother_free(pa_smoother* s) {
|
||||||
|
pa_assert(s);
|
||||||
|
|
||||||
|
pa_xfree(s);
|
||||||
|
}
|
||||||
|
|
||||||
static void drop_old(pa_smoother *s, pa_usec_t x) {
|
static void drop_old(pa_smoother *s, pa_usec_t x) {
|
||||||
unsigned j;
|
unsigned j;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
typedef struct pa_smoother pa_smoother;
|
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);
|
pa_smoother* pa_smoother_new(pa_usec_t adjust_x, pa_usec_t history_x, pa_bool_t monotonic);
|
||||||
|
void pa_smoother_free(pa_smoother* s);
|
||||||
|
|
||||||
void pa_smoother_put(pa_smoother *s, pa_usec_t x, pa_usec_t y);
|
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);
|
pa_usec_t pa_smoother_get(pa_smoother *s, pa_usec_t x);
|
||||||
|
|
|
||||||
|
|
@ -69,4 +69,7 @@ int main(int argc, char*argv[]) {
|
||||||
printf("%llu\t%llu\n", x/PA_USEC_PER_MSEC, pa_smoother_get(s, x)/PA_USEC_PER_MSEC);
|
printf("%llu\t%llu\n", x/PA_USEC_PER_MSEC, pa_smoother_get(s, x)/PA_USEC_PER_MSEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pa_smoother_free(s);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue