shithub: libsamplerate

Download patch

ref: 5f270f41c7a013319bdd1e7b63ae057b44f7d6fd
parent: f714fb9316d49806397393728a0ba71336913ff5
author: Erik de Castro Lopo <erikd@miles>
date: Mon Jun 28 05:37:03 EDT 2004

Minor cleanup of fixes in src_sinc.c.

--- a/src/src_sinc.c
+++ b/src/src_sinc.c
@@ -332,9 +332,9 @@
 		/* Figure out the next index. */
 		input_index += 1.0 / src_ratio ;
 		rem = fmod (input_index, 1.0) ;
-		input_index -= rem ;
+		input_index = round (input_index - rem) ;
 
-		filter->b_current = (filter->b_current + filter->channels * lrint (round (input_index))) % filter->b_len ;
+		filter->b_current = (filter->b_current + filter->channels * lrint (input_index)) % filter->b_len ;
 		input_index = rem ;
 		} ;