X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/9f59b4e1cd516dbbc8a4978146bc94f2a1ce75eb..e9d9356d110945bf9bc8c3ca0e1cb0b1d42a67a1:/src/tests/interpol-test.c diff --git a/src/tests/interpol-test.c b/src/tests/interpol-test.c index 26a92dbf..2df65a45 100644 --- a/src/tests/interpol-test.c +++ b/src/tests/interpol-test.c @@ -1,20 +1,20 @@ /* $Id$ */ /*** - This file is part of polypaudio. + This file is part of PulseAudio. - polypaudio is free software; you can redistribute it and/or modify + 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 of the License, or (at your option) any later version. - polypaudio is distributed in the hope that it will be useful, but + 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 General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with polypaudio; if not, write to the Free Software + along with PulseAudio; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. ***/ @@ -32,10 +32,13 @@ #include #include #include + +#ifdef HAVE_PTHREAD #include +#endif -#include -#include +#include +#include static pa_context *context = NULL; static pa_stream *stream = NULL; @@ -136,16 +139,22 @@ int main(int argc, char *argv[]) { pa_gettimeofday(&now); rtc = pa_timeval_diff(&now, &start); - printf("%i\t%llu\t%llu\t%llu\t%llu\t%u\n", k, rtc, t, rtc-old_rtc, t-old_t, changed*2000000); + printf("%i\t%llu\t%llu\t%llu\t%llu\t%u\n", k, rtc, t, rtc-old_rtc, t-old_t, changed); old_t = t; old_rtc = rtc; } - /* Spin loop, eerks but normal usleep is just to badly grained */ + /* Spin loop, ugly but normal usleep() is just too badly grained */ tv = now; while (pa_timeval_diff(pa_gettimeofday(&now), &tv) < 1000) +#ifdef HAVE_PTHREAD_YIELD pthread_yield(); +#elif defined(OS_IS_WIN32) + Sleep(0); +#else + ; +#endif } if (m)