diff tests/TestResampler.cpp @ 381:88971211795c

Lower filter cutoff to below target Nyquist when downsampling
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 01 Nov 2013 12:07:08 +0000
parents ad21307eaf99
children fd207df9432e
line wrap: on
line diff
--- a/tests/TestResampler.cpp	Tue Oct 22 08:58:28 2013 +0100
+++ b/tests/TestResampler.cpp	Fri Nov 01 12:07:08 2013 +0000
@@ -197,9 +197,9 @@
 	outSpectrum[i] /= outrate;
     }
 
-    // Don't compare bins any higher than 99% of Nyquist freq of lower sr
+    // Don't compare bins any higher than 96% of Nyquist freq of lower sr
     int lengthOfInterest = (inrate < outrate ? inrate : outrate) / 2;
-    lengthOfInterest = lengthOfInterest - (lengthOfInterest / 100);
+    lengthOfInterest = lengthOfInterest - (lengthOfInterest / 25);
 
     for (int i = 0; i < lengthOfInterest; ++i) {
 	BOOST_CHECK_SMALL(inSpectrum[i] - outSpectrum[i], 1e-7);