r4138 - trunk/bse/tests



Author: timj
Date: 2006-12-10 19:13:50 -0500 (Sun, 10 Dec 2006)
New Revision: 4138

Modified:
   trunk/bse/tests/filtertest.cc
Log:
Mon Dec 11 01:13:00 2006  Tim Janik  <timj gtk org>                                                                                                           
                                                                                                                                                              
        * tests/filtertest.cc (generic_filter_tests): added missing stopband                                                                                  
        damping check for LOWPASS filters, caught by Stefan.                                                                                                  
                                                                                                                                                              



Modified: trunk/bse/tests/filtertest.cc
===================================================================
--- trunk/bse/tests/filtertest.cc	2006-12-10 23:20:59 UTC (rev 4137)
+++ trunk/bse/tests/filtertest.cc	2006-12-11 00:13:50 UTC (rev 4138)
@@ -772,6 +772,11 @@
           TCHECK_CMP (max_pass_damping, >, passband_ripple_db - 0.01);
           TCHECK_CMP (max_pass_damping, <, passband_ripple_db * 0.9);
         }
+      if (req->type == BSE_IIR_FILTER_LOW_PASS)
+        {
+          double max_stop_damping = max_band_damping (&fdes, 0.5 * req->sampling_frequency, 0.5 * req->sampling_frequency);
+          TCHECK_CMP (max_stop_damping, <, stopband_db * 0.98);
+        }
       if (req->type == BSE_IIR_FILTER_HIGH_PASS)
         {
           double min_pass_damping = min_band_damping (&fdes, req->passband_edge, 0.5 * req->sampling_frequency);




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]