]> code.delx.au - pulseaudio/blobdiff - src/tests/interpol-test.c
add new macro PA_LLIST_INSERT_AFTER
[pulseaudio] / src / tests / interpol-test.c
index 26a92dbf0b6582a34c9163c7cc856aa22ff2687a..2df65a4550390dc17d9256dd690db39500db2492 100644 (file)
@@ -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.
 ***/
 #include <stdlib.h>
 #include <getopt.h>
 #include <math.h>
+
+#ifdef HAVE_PTHREAD
 #include <pthread.h>
+#endif
 
-#include <polyp/polypaudio.h>
-#include <polyp/mainloop.h>
+#include <pulse/pulseaudio.h>
+#include <pulse/mainloop.h>
 
 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)