[pulseaudio-discuss] [PATCH] Make connect-stress test compile for win32

Maarten Bosmans mkbosmans at gmail.com
Sat Apr 30 12:46:30 PDT 2011


---
 src/tests/connect-stress.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/tests/connect-stress.c b/src/tests/connect-stress.c
index 5476675..eadcf88 100644
--- a/src/tests/connect-stress.c
+++ b/src/tests/connect-stress.c
@@ -118,7 +118,7 @@ static void stream_write_callback(pa_stream *stream, size_t nbytes, void *userda
     memset(silence, 0, sizeof(silence));
 
     while (nbytes) {
-        int n = MIN(sizeof(silence), nbytes);
+        int n = PA_MIN(sizeof(silence), nbytes);
         pa_stream_write(stream, silence, n, NULL, 0, 0);
         nbytes -= n;
     }
@@ -195,9 +195,9 @@ int main(int argc, char *argv[]) {
 
     for (i = 0; i < NTESTS; i++) {
         connect(argv[0], &i);
-        usleep(random() % 500000);
+        usleep(rand() % 500000);
         disconnect();
-        usleep(random() % 500000);
+        usleep(rand() % 500000);
     }
 
     fprintf(stderr, "Done.\n");
-- 
1.7.1




More information about the pulseaudio-discuss mailing list