shithub: sox

Download patch

ref: f9bed986007b991d6b243c1754442be291f76735
parent: daf445fed6b8ff833b405c273585ab9ce5c08d2c
author: robs <robs>
date: Fri Oct 24 16:58:13 EDT 2008

fix delay for phase > linear

--- a/src/rate.c
+++ b/src/rate.c
@@ -299,7 +299,7 @@
   }
   for (i = 0; i < *len; ++i)
     (*h)[i] = work[begin + (phase0 > 50 ? *len - 1 - i : i)];
-  *post_len = begin + *len - (peak + 1);
+  *post_len = phase0 > 50 ? peak - begin : begin + *len - (peak + 1);
   free(work);
 }