diff tests/TestPhaseVocoder.cpp @ 129:6ec45e85ed81 kissfft

Drop in kissfft to replace the "old" fft, and add tests for newly-supported sizes
author Chris Cannam
date Tue, 15 Oct 2013 11:38:18 +0100
parents b0e98fcfacd7
children 2de6184b2ce0
line wrap: on
line diff
--- a/tests/TestPhaseVocoder.cpp	Tue Oct 15 09:39:58 2013 +0100
+++ b/tests/TestPhaseVocoder.cpp	Tue Oct 15 11:38:18 2013 +0100
@@ -164,14 +164,16 @@
     //   phase of -pi/2 plus advance of 2pi). It has the same measured
     //   phase as last time around, -pi/2, which is consistent with
     //   the expected phase, so the unwrapped phase is 3pi/2.
-    //!!!
-    // * Bin 3 is a bit of a puzzle -- it has an effectively zero
-    //   magnitude but a non-zero measured phase. Spectral leakage?
+    //
+    // * Bin 3 I don't really know about -- the magnitude here is 0,
+    //   but we get non-zero measured phase whose sign is
+    //   implementation-dependent
     //
     // * Bin 4 (Nyquist) has expected phase 4*pi, measured phase 0,
     //   hence error 0 and unwrapped phase 4*pi.
 
-    double phaseExpected1[] = { 999, 0, -M_PI, -M_PI/2, M_PI, 0, 999 };
+    phase[1+3] = 0.0; // Because we aren't testing for this one
+    double phaseExpected1[] = { 999, 0, -M_PI, -M_PI/2, 0, 0, 999 };
     COMPARE_ARRAY(phase, phaseExpected1);
 
     double unwExpected1[] = { 999, 0, M_PI, 3*M_PI/2, 3*M_PI, 4*M_PI, 999 };