From 097b83163e65b9828a2bddffd15dc1504a1acab4 Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Sat, 26 Apr 2014 09:44:39 -0400 Subject: Updates to test programs when specifying default device numbers. --- tests/testall.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/testall.cpp') diff --git a/tests/testall.cpp b/tests/testall.cpp index ec7107b..419f27b 100644 --- a/tests/testall.cpp +++ b/tests/testall.cpp @@ -128,6 +128,9 @@ int main( int argc, char *argv[] ) oParams.nChannels = channels; oParams.firstChannel = oOffset; + if ( oDevice == 0 ) + oParams.deviceId = dac.getDefaultOutputDevice(); + RtAudio::StreamOptions options; options.flags = RTAUDIO_HOG_DEVICE; try { @@ -192,6 +195,8 @@ int main( int argc, char *argv[] ) 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 ); -- cgit v1.2.3