#define REPETITIONS 10\r
\r
// Platform-dependent sleep routines.\r
-#if defined( __WINDOWS_ASIO__ ) || defined( __WINDOWS_DS__ )\r
+#if defined( __WINDOWS_ASIO__ ) || defined( __WINDOWS_DS__ ) || defined( __WINDOWS_WASAPI__ )\r
#include <windows.h>\r
#define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds ) \r
#else // Unix variants\r
};\r
\r
// Interleaved buffers\r
-int pulse( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,\r
- double streamTime, RtAudioStreamStatus status, void *mydata )\r
+int pulse( void *outputBuffer, void * /*inputBuffer*/, unsigned int nBufferFrames,\r
+ double /*streamTime*/, RtAudioStreamStatus status, void *mydata )\r
{\r
// Write out a pulse signal and ignore the input buffer.\r
unsigned int i, j;\r
pausetime = PAUSETIME * 1000;\r
\r
// Set our stream parameters for a duplex stream.\r
- bufferFrames = 256;\r
+ bufferFrames = 512;\r
RtAudio::StreamParameters oParams, iParams;\r
oParams.deviceId = oDevice;\r
oParams.nChannels = mydata.channels;\r
iParams.nChannels = mydata.channels;\r
iParams.firstChannel = iOffset;\r
\r
+ if ( iDevice == 0 )\r
+ iParams.deviceId = adc->getDefaultInputDevice();\r
+ if ( oDevice == 0 )\r
+ oParams.deviceId = adc->getDefaultOutputDevice();\r
+\r
// First, test external stopStream() calls.\r
mydata.pulseCount = PULSE_RATE * fs;\r
mydata.nFrames = 50 * fs;\r
SLEEP( pausetime );\r
}\r
}\r
- catch ( RtError& e ) {\r
+ catch ( RtAudioError& e ) {\r
e.printMessage();\r
goto cleanup;\r
}\r
SLEEP( pausetime );\r
}\r
}\r
- catch ( RtError& e ) {\r
+ catch ( RtAudioError& e ) {\r
e.printMessage();\r
goto cleanup;\r
}\r
SLEEP( pausetime );\r
}\r
}\r
- catch ( RtError& e ) {\r
+ catch ( RtAudioError& e ) {\r
e.printMessage();\r
goto cleanup;\r
}\r
SLEEP( pausetime );\r
}\r
}\r
- catch ( RtError& e ) {\r
+ catch ( RtAudioError& e ) {\r
e.printMessage();\r
goto cleanup;\r
}\r
SLEEP( pausetime );\r
}\r
}\r
- catch ( RtError& e ) {\r
+ catch ( RtAudioError& e ) {\r
e.printMessage();\r
goto cleanup;\r
}\r