shithub: libsamplerate

Download patch

ref: f69f0c20d9848d33291a8283df55d721657395b9
parent: 574720af06a0f6f1530755deeb268b5a3eb0eef6
author: Erik de Castro Lopo <erikd@mega-nerd.com>
date: Tue Dec 16 10:16:02 EST 2008

tests/multi_channel_test.c : Only test 1, 2 and 3 channels for ZOH and linear converters.

--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@
     Make 6 channel Sinc conversion another special case.
     Use Duff's Device to speed up the multi-channel case.
 
+    * tests/multi_channel_test.c
+    Only test 1, 2 and 3 channels for ZOH and linear converters.
+
 2008-12-15  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
 
     * src/samplerate.c
--- a/tests/multi_channel_test.c
+++ b/tests/multi_channel_test.c
@@ -43,7 +43,7 @@
 
 	puts ("\n    Zero Order Hold interpolator :") ;
 	target = 38.0 ;
-	for (k = 1 ; k <= MAX_CHANNELS ; k++)
+	for (k = 1 ; k <= 3 ; k++)
 	{	simple_test		(SRC_ZERO_ORDER_HOLD, k, target) ;
 		process_test	(SRC_ZERO_ORDER_HOLD, k, target) ;
 		callback_test	(SRC_ZERO_ORDER_HOLD, k, target) ;
@@ -51,7 +51,7 @@
 
 	puts ("\n    Linear interpolator :") ;
 	target = 79.0 ;
-	for (k = 1 ; k <= MAX_CHANNELS ; k++)
+	for (k = 1 ; k <= 3 ; k++)
 	{	simple_test		(SRC_LINEAR, k, target) ;
 		process_test	(SRC_LINEAR, k, target) ;
 		callback_test	(SRC_LINEAR, k, target) ;
@@ -85,7 +85,7 @@
 	double	freq, snr ;
 	int		ch, error, frames ;
 
-	printf ("\t%-22s (%d channel%c) ............. ", "simple_test", channel_count, channel_count > 1 ? 's' : ' ') ;
+	printf ("\t%-22s (%2d channel%c) ............ ", "simple_test", channel_count, channel_count > 1 ? 's' : ' ') ;
 	fflush (stdout) ;
 
 	assert (channel_count <= MAX_CHANNELS) ;
@@ -157,7 +157,7 @@
 	double	freq, snr ;
 	int		ch, error, frames, current_in, current_out ;
 
-	printf ("\t%-22s (%d channel%c) ............. ", "process_test", channel_count, channel_count > 1 ? 's' : ' ') ;
+	printf ("\t%-22s (%2d channel%c) ............ ", "process_test", channel_count, channel_count > 1 ? 's' : ' ') ;
 	fflush (stdout) ;
 
 	assert (channel_count <= MAX_CHANNELS) ;
@@ -285,7 +285,7 @@
 	double	freq, snr, src_ratio ;
 	int		ch, error, frames, read_total, read_count ;
 
-	printf ("\t%-22s (%d channel%c) ............. ", "callback_test", channel_count, channel_count > 1 ? 's' : ' ') ;
+	printf ("\t%-22s (%2d channel%c) ............ ", "callback_test", channel_count, channel_count > 1 ? 's' : ' ') ;
 	fflush (stdout) ;
 
 	assert (channel_count <= MAX_CHANNELS) ;