oParams.nChannels = channels;
oParams.firstChannel = oOffset;
+ if ( iDevice == 0 )
+ iParams.deviceId = adac.getDefaultInputDevice();
+ if ( oDevice == 0 )
+ oParams.deviceId = adac.getDefaultOutputDevice();
+
RtAudio::StreamOptions options;
//options.flags |= RTAUDIO_NONINTERLEAVED;
oParams.nChannels = channels;
oParams.firstChannel = offset;
+ if ( device == 0 )
+ oParams.deviceId = dac.getDefaultOutputDevice();
+
data.channels = channels;
try {
dac.openStream( &oParams, NULL, FORMAT, fs, &bufferFrames, &output, (void *)&data );
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 )
oParams.nChannels = channels;
oParams.firstChannel = oOffset;
+ if ( oDevice == 0 )
+ oParams.deviceId = dac.getDefaultOutputDevice();
+
RtAudio::StreamOptions options;
options.flags = RTAUDIO_HOG_DEVICE;
try {
iParams.deviceId = iDevice;
iParams.nChannels = channels;
iParams.firstChannel = iOffset;
+ if ( iDevice == 0 )
+ iParams.deviceId = dac.getDefaultInputDevice();
options.flags = RTAUDIO_NONINTERLEAVED;
try {
dac.openStream( &oParams, &iParams, RTAUDIO_SINT32, fs, &bufferFrames, &inout, (void *)&bufferBytes, &options );
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