]> Repos - portaudio/commitdiff
Fix warnings in loopback.
authorphilburk <philburk@0f58301d-fd10-0410-b4af-bbb618454e57>
Thu, 8 Sep 2011 09:29:21 +0000 (09:29 +0000)
committerphilburk <philburk@0f58301d-fd10-0410-b4af-bbb618454e57>
Thu, 8 Sep 2011 09:29:21 +0000 (09:29 +0000)
Disable test for defaultHigh > defaultLow.

qa/loopback/src/paqa.c
qa/paqa_latency.c

index ad993a935b2b5e1f40465b8cce203c2ec71578ca..c324caf29a09e8661e9cb584a23673413660eee7 100644 (file)
@@ -1063,7 +1063,7 @@ static int PaQa_AnalyzeLoopbackConnection( UserOptions *userOptions, PaDeviceInd
     
        PaQa_SetDefaultTestParameters( &testParams, inputDevice, outputDevice );
        testParams.flags = PAQA_FLAG_TWO_STREAMS;       
-    for( int iFlags= 0; iFlags<4; iFlags++ )
+    for( iFlags= 0; iFlags<4; iFlags++ )
     {
         // Cycle through combinations of flags.
         testParams.streamFlags = 0;
index 3c0fc2e40a38956b1ba573ebac319a47af0317e2..e7db42edd4cfc2699c6ccf5b0348bfc2589b1186 100644 (file)
@@ -248,6 +248,11 @@ static int paqaCheckMultipleSuggested( PaDeviceIndex deviceIndex, int isInput )
     printf(" highLatency = %g\n", highLatency );
     printf(" numChannels = %d\n", numChannels );
     
+    if( (highLatency - lowLatency) < 0.001 )
+    {
+               numLoops = 1;
+       }
+       
     for( i=0; i<numLoops; i++ )
     {   
         streamParameters.suggestedLatency = lowLatency + ((highLatency - lowLatency) * i /(numLoops - 1.0));
@@ -335,7 +340,7 @@ static int paqaVerifyDeviceInfoLatency( void )
             printf("  Output info: defaultHighOutputLatency = %f seconds\n", pdi->defaultHighOutputLatency);
             QA_ASSERT_TRUE( "defaultLowOutputLatency should be > 0", (pdi->defaultLowOutputLatency > 0.0) );
             QA_ASSERT_TRUE( "defaultHighOutputLatency should be > 0", (pdi->defaultHighOutputLatency > 0.0) );
-            QA_ASSERT_TRUE( "defaultHighOutputLatency should be > Low", (pdi->defaultHighOutputLatency > pdi->defaultLowOutputLatency) );
+            //QA_ASSERT_TRUE( "defaultHighOutputLatency should be > Low", (pdi->defaultHighOutputLatency > pdi->defaultLowOutputLatency) );
         }
         if( pdi->maxInputChannels > 0 )
         {
@@ -343,7 +348,7 @@ static int paqaVerifyDeviceInfoLatency( void )
             printf("  Input defaultHighOutputLatency = %f seconds\n", pdi->defaultHighInputLatency);
             QA_ASSERT_TRUE( "defaultLowOutputLatency should be > 0", (pdi->defaultLowInputLatency > 0.0) );
             QA_ASSERT_TRUE( "defaultHighOutputLatency should be > 0", (pdi->defaultHighInputLatency > 0.0) );
-            QA_ASSERT_TRUE( "defaultHighOutputLatency should be > Low", (pdi->defaultHighInputLatency > pdi->defaultLowInputLatency) );
+            //QA_ASSERT_TRUE( "defaultHighOutputLatency should be > Low", (pdi->defaultHighInputLatency > pdi->defaultLowInputLatency) );
         }
     }
     return 0;