Mercurial > hg > qm-dsp
comparison 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 |
comparison
equal
deleted
inserted
replaced
128:5023f521732c | 129:6ec45e85ed81 |
---|---|
162 // | 162 // |
163 // * Bin 2 has expected phase 3pi/2 (being the previous measured | 163 // * Bin 2 has expected phase 3pi/2 (being the previous measured |
164 // phase of -pi/2 plus advance of 2pi). It has the same measured | 164 // phase of -pi/2 plus advance of 2pi). It has the same measured |
165 // phase as last time around, -pi/2, which is consistent with | 165 // phase as last time around, -pi/2, which is consistent with |
166 // the expected phase, so the unwrapped phase is 3pi/2. | 166 // the expected phase, so the unwrapped phase is 3pi/2. |
167 //!!! | 167 // |
168 // * Bin 3 is a bit of a puzzle -- it has an effectively zero | 168 // * Bin 3 I don't really know about -- the magnitude here is 0, |
169 // magnitude but a non-zero measured phase. Spectral leakage? | 169 // but we get non-zero measured phase whose sign is |
170 // implementation-dependent | |
170 // | 171 // |
171 // * Bin 4 (Nyquist) has expected phase 4*pi, measured phase 0, | 172 // * Bin 4 (Nyquist) has expected phase 4*pi, measured phase 0, |
172 // hence error 0 and unwrapped phase 4*pi. | 173 // hence error 0 and unwrapped phase 4*pi. |
173 | 174 |
174 double phaseExpected1[] = { 999, 0, -M_PI, -M_PI/2, M_PI, 0, 999 }; | 175 phase[1+3] = 0.0; // Because we aren't testing for this one |
176 double phaseExpected1[] = { 999, 0, -M_PI, -M_PI/2, 0, 0, 999 }; | |
175 COMPARE_ARRAY(phase, phaseExpected1); | 177 COMPARE_ARRAY(phase, phaseExpected1); |
176 | 178 |
177 double unwExpected1[] = { 999, 0, M_PI, 3*M_PI/2, 3*M_PI, 4*M_PI, 999 }; | 179 double unwExpected1[] = { 999, 0, M_PI, 3*M_PI/2, 3*M_PI, 4*M_PI, 999 }; |
178 COMPARE_ARRAY(unw, unwExpected1); | 180 COMPARE_ARRAY(unw, unwExpected1); |
179 | 181 |