From 6faf4336eb5952b141e1c239d194f5cd70f0a885 Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Wed, 13 Apr 2011 00:50:38 +0000 Subject: Updates for release 4.0.8, including new python binding, new teststops.cpp program, ALSA "default" flag, and various changes to stopping behavior (GS). --- tests/playsaw.cpp | 52 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 13 deletions(-) (limited to 'tests/playsaw.cpp') diff --git a/tests/playsaw.cpp b/tests/playsaw.cpp index b89d5f9..51f8ad9 100644 --- a/tests/playsaw.cpp +++ b/tests/playsaw.cpp @@ -40,22 +40,36 @@ typedef double MY_TYPE; #define SCALE 1.0 */ +// Platform-dependent sleep routines. +#if defined( __WINDOWS_ASIO__ ) || defined( __WINDOWS_DS__ ) + #include + #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds ) +#else // Unix variants + #include + #define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) ) +#endif + #define BASE_RATE 0.005 #define TIME 1.0 void usage( void ) { // Error function in case of incorrect command-line // argument specifications - std::cout << "\nuseage: playsaw N fs \n"; + std::cout << "\nuseage: playsaw N fs