More detailed error message.
[rtaudio-cdist.git] / tests / playsaw.cpp
index dc36d4c3455cc34d34e25ab135590b77cee0175d..1f7bd52c5fe389528796cf609a37893db220da9e 100644 (file)
@@ -41,7 +41,7 @@ typedef double MY_TYPE;
 */
 
 // Platform-dependent sleep routines.
-#if defined( __WINDOWS_ASIO__ ) || defined( __WINDOWS_DS__ )
+#if defined( WIN32 )
   #include <windows.h>
   #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds ) 
 #else // Unix variants
@@ -174,6 +174,9 @@ int main( int argc, char *argv[] )
   oParams.nChannels = channels;
   oParams.firstChannel = offset;
 
+  if ( device == 0 )
+    oParams.deviceId = dac.getDefaultOutputDevice();
+
   options.flags = RTAUDIO_HOG_DEVICE;
   options.flags |= RTAUDIO_SCHEDULE_REALTIME;
 #if !defined( USE_INTERLEAVED )