From 27c3b518cbae78d6ea78284bcb64fe71d24340f1 Mon Sep 17 00:00:00 2001 From: gineera Date: Sat, 7 Sep 2013 10:14:52 +0000 Subject: [PATCH] paqa_devs: limit max number of channels tested (to 4); add a fixed decimal format to the timestamp printout. --- qa/paqa_devs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qa/paqa_devs.c b/qa/paqa_devs.c index c83520c..721b07f 100644 --- a/qa/paqa_devs.c +++ b/qa/paqa_devs.c @@ -59,6 +59,7 @@ /****************************************** Definitions ***********/ #define MODE_INPUT (0) #define MODE_OUTPUT (1) +#define MAX_TEST_CHANNELS 4 typedef struct PaQaData { @@ -235,6 +236,8 @@ static void TestDevices( int mode ) pdi = Pa_GetDeviceInfo( id ); /* Try 1 to maxChannels on each device. */ maxChannels = (( mode == MODE_INPUT ) ? pdi->maxInputChannels : pdi->maxOutputChannels); + if( maxChannels > MAX_TEST_CHANNELS ) + maxChannels = MAX_TEST_CHANNELS; for( jc=1; jc<=maxChannels; jc++ ) { @@ -350,7 +353,7 @@ static int TestAdvance( int mode, PaDeviceIndex deviceID, double sampleRate, oldStamp = Pa_GetStreamTime(stream); Pa_Sleep(msec); newStamp = Pa_GetStreamTime(stream); - printf("oldStamp = %g, newStamp = %g\n", oldStamp, newStamp ); /**/ + printf("oldStamp = %9.6f, newStamp = %9.6f\n", oldStamp, newStamp ); /**/ EXPECT( (oldStamp < newStamp) ); /* Check to make sure callback is decrementing framesLeft. */ oldFrames = myData.framesLeft; -- 2.43.0