Loopback: fix warnings that prevent compilation

Add newline in biquad_filter.c
Add integer assert with tolerance.
This commit is contained in:
Phil Burk 2016-07-26 19:10:23 -07:00
commit cf4ef2ce19
3 changed files with 18 additions and 9 deletions

View file

@ -890,10 +890,10 @@ static int PaQa_SingleLoopBackTest( UserOptions *userOptions, TestParameters *te
{
printf( "OK" );
}
printf( "\n" );
// Print the # errors so far to make it easier to see where the error occured.
printf( " - #errs = %d\n", g_testsFailed );
PaQa_TeardownLoopbackContext( &loopbackContext );
if( numBadChannels > 0 )
{
@ -1376,25 +1376,25 @@ int TestSampleFormatConversion( void )
PaQa_ConvertFromFloat( floatInput, 4, paUInt8, ucharOutput );
for( i=0; i<4; i++ )
{
QA_ASSERT_CLOSE( "paFloat32 -> paUInt8 -> error", ucharInput[i], ucharOutput[i], 1 );
QA_ASSERT_CLOSE_INT( "paFloat32 -> paUInt8 -> error", ucharInput[i], ucharOutput[i], 1 );
}
PaQa_ConvertFromFloat( floatInput, 4, paInt8, charOutput );
for( i=0; i<4; i++ )
{
QA_ASSERT_CLOSE( "paFloat32 -> paInt8 -> error", charInput[i], charOutput[i], 1 );
QA_ASSERT_CLOSE_INT( "paFloat32 -> paInt8 -> error", charInput[i], charOutput[i], 1 );
}
PaQa_ConvertFromFloat( floatInput, 4, paInt16, shortOutput );
for( i=0; i<4; i++ )
{
QA_ASSERT_CLOSE( "paFloat32 -> paInt16 error", shortInput[i], shortOutput[i], 1 );
QA_ASSERT_CLOSE_INT( "paFloat32 -> paInt16 error", shortInput[i], shortOutput[i], 1 );
}
PaQa_ConvertFromFloat( floatInput, 4, paInt32, intOutput );
for( i=0; i<4; i++ )
{
QA_ASSERT_CLOSE( "paFloat32 -> paInt32 error", intInput[i], intOutput[i], 0x00010000 );
QA_ASSERT_CLOSE_INT( "paFloat32 -> paInt32 error", intInput[i], intOutput[i], 0x00010000 );
}