]> Repos - portaudio/commitdiff
paqa_devs: limit max number of channels tested (to 4); add a fixed decimal format...
authorgineera <gineera@0f58301d-fd10-0410-b4af-bbb618454e57>
Sat, 7 Sep 2013 10:14:52 +0000 (10:14 +0000)
committergineera <gineera@0f58301d-fd10-0410-b4af-bbb618454e57>
Sat, 7 Sep 2013 10:14:52 +0000 (10:14 +0000)
qa/paqa_devs.c

index c83520c3acd4803195499797f3c090c9ab3a0e79..721b07f14fc59ceb5b069f3260000facbfa6bfd4 100644 (file)
@@ -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;