]> code.delx.au - pulseaudio/commitdiff
Make interpol-test build on Win32 and non-pthread systems.
authorPierre Ossman <ossman@cendio.se>
Tue, 20 Jun 2006 13:49:30 +0000 (13:49 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 20 Jun 2006 13:49:30 +0000 (13:49 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1043 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/tests/interpol-test.c

index 7cabc1c9cf2ebdd0994c9fd7d3456ee44677dd6a..bf7f582c9f450eefd0e81b586a06193a7bd9f8de 100644 (file)
 #include <stdlib.h>
 #include <getopt.h>
 #include <math.h>
+
+#ifdef HAVE_PTHREAD
 #include <pthread.h>
+#endif
 
 #include <pulse/pulseaudio.h>
 #include <pulse/mainloop.h>
@@ -145,7 +148,13 @@ int main(int argc, char *argv[]) {
 
         tv = now;
         while (pa_timeval_diff(pa_gettimeofday(&now), &tv) < 1000)
+#ifdef HAVE_PTHREAD
             pthread_yield();
+#elif defined(OS_IS_WIN32)
+            Sleep(0);
+#else
+            ;
+#endif
     }
 
     if (m)