[xiph-commits] r16177 - icecast/trunk/libshout/examples
brendan at svn.xiph.org
brendan at svn.xiph.org
Tue Jun 23 10:45:19 PDT 2009
Author: brendan
Date: 2009-06-23 10:45:19 -0700 (Tue, 23 Jun 2009)
New Revision: 16177
Modified:
icecast/trunk/libshout/examples/nonblocking.c
Log:
Use usleep instead of sleep in nonblocking example.
MinGW/MSys do not support sleep()
Modified: icecast/trunk/libshout/examples/nonblocking.c
===================================================================
--- icecast/trunk/libshout/examples/nonblocking.c 2009-06-23 17:42:06 UTC (rev 16176)
+++ icecast/trunk/libshout/examples/nonblocking.c 2009-06-23 17:45:19 UTC (rev 16177)
@@ -66,9 +66,11 @@
if (ret == SHOUTERR_SUCCESS)
ret = SHOUTERR_CONNECTED;
+ if (ret == SHOUTERR_BUSY)
+ printf("Connection pending...\n");
+
while (ret == SHOUTERR_BUSY) {
- printf("Connection pending. Sleeping...\n");
- sleep(1);
+ usleep(10000);
ret = shout_get_connected(shout);
}
More information about the commits
mailing list