Fix up the patch to work on ppc

This commit is contained in:
Lubomir Rintel 2009-05-08 10:13:07 +00:00
parent c33a8ec7fc
commit 4e24e51ca5

View File

@ -10,7 +10,7 @@ diff -up libsamplerate-0.1.7/tests/callback_test.c.test libsamplerate-0.1.7/test
src_state = src_delete (src_state) ;
- if (fabs (read_total - src_ratio * ARRAY_LEN (test_callback_data.data)) > src_ratio)
+ if (fabs (read_total - src_ratio * ARRAY_LEN (test_callback_data.data)) > ceil (src_ratio))
+ if (fabs (read_total - floor (0.5 + src_ratio * ARRAY_LEN (test_callback_data.data))) > ceil (src_ratio))
{ printf ("\n\nLine %d : input / output length mismatch.\n\n", __LINE__) ;
printf (" input len : %d\n", ARRAY_LEN (test_callback_data.data)) ;
printf (" output len : %ld (should be %g +/- %g)\n\n", read_total,