From 18e975fc5ef68a89875c77974570884b9214a009 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 20 Jul 2009 17:34:17 +0200 Subject: merged --- src/tests/smoother-test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/tests/smoother-test.c') diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c index 798dfed5..2cc9f58b 100644 --- a/src/tests/smoother-test.c +++ b/src/tests/smoother-test.c @@ -45,10 +45,12 @@ int main(int argc, char*argv[]) { srand(0); + pa_log_set_level(PA_LOG_DEBUG); + for (m = 0, u = 0; u < PA_ELEMENTSOF(msec); u+= 2) { msec[u] = m+1 + (rand() % 100) - 50; - msec[u+1] = m + (rand() % 2000) - 1000; + msec[u+1] = m + (rand() % 2000) - 1000 + 5000; m += rand() % 100; @@ -59,7 +61,7 @@ int main(int argc, char*argv[]) { msec[u+1] = 0; } - s = pa_smoother_new(700*PA_USEC_PER_MSEC, 2000*PA_USEC_PER_MSEC, TRUE, 6); + s = pa_smoother_new(700*PA_USEC_PER_MSEC, 2000*PA_USEC_PER_MSEC, FALSE, TRUE, 6, 0, TRUE); for (x = 0, u = 0; x < PA_USEC_PER_SEC * 10; x += PA_USEC_PER_MSEC) { @@ -67,6 +69,8 @@ int main(int argc, char*argv[]) { pa_smoother_put(s, (pa_usec_t) msec[u] * PA_USEC_PER_MSEC, (pa_usec_t) msec[u+1] * PA_USEC_PER_MSEC); printf("%i\t\t%i\n", msec[u], msec[u+1]); u += 2; + + pa_smoother_resume(s, (pa_usec_t) msec[u] * PA_USEC_PER_MSEC, TRUE); } printf("%llu\t%llu\n", (unsigned long long) (x/PA_USEC_PER_MSEC), (unsigned long long) (pa_smoother_get(s, x)/PA_USEC_PER_MSEC)); -- cgit