shithub: sox

Download patch

ref: f952fd79317fbcb8885c9c6903ff7949f6b2ef23
parent: f37f0c8758b985ad853a3d7b06176a3bd76982e7
author: cbagwell <cbagwell>
date: Mon Feb 21 14:52:29 EST 2005

Fix typo in nuttall calculation.

--- a/Changelog
+++ b/Changelog
@@ -11,6 +11,7 @@
   o Stuart Brady added support for reading and writing RIFX files (big
     endian RIFF/WAV files).  Also added support for auto detecting
     DEC-style ".sd\0" files.
+  o Gene Mar found typo in polyphase nuttall calculation.
 
 sox-12.17.7
 -----------
--- a/TODO
+++ b/TODO
@@ -1,6 +1,14 @@
 People are encouraged to pick some of these and implement it.  Send
 all patches to cbagwell@users.sourceforge.net.
 
+  o Make "mix" an alias of "avg" since thats closer to what it
+    really is.  For 2->2 mixes, make a 2 option L->L and R->R
+    shortcut.  Similar 4 option for 4->4.
+
+  o In avg effect, going from 1->2 should have a 2 number shortcut
+    so that you don't have to put 100% in each channel.  Similar
+    for 2->4.
+
   o Remove FFT code from stat effect and use new FFT.c code.
     Ideally, FFT needs to become LGPL license instead of
     GPL so that it can be used as apart of LGPL libst.
--- a/src/polyphas.c
+++ b/src/polyphas.c
@@ -313,7 +313,7 @@
   N1 = length/2;
 
   for(j = 0; j < length; j++) {
-    buffer[j] = 0.36335819 +
+    buffer[j] = 0.3635819 +
       0.4891775 * cos(2*PI*1*(j - N1) / N) +
       0.1365995 * cos(2*PI*2*(j - N1) / N) +
       0.0106411 * cos(2*PI*3*(j - N1) / N);