shithub: aubio

Download patch

ref: f7af440a1cf793f1b6789ab0b06e4687f7d632b9
parent: 62c2d005cd49b3d20341621fe70b3de1087ab632
author: Paul Brossier <piem@piem.org>
date: Sat Nov 17 14:46:51 EST 2018

[test] improve coverage of filters

--- a/tests/src/temporal/test-filter.c
+++ b/tests/src/temporal/test-filter.c
@@ -8,6 +8,12 @@
   fvec_t *out = new_fvec (win_s); // input buffer
 
   aubio_filter_t *o = new_aubio_filter_c_weighting (44100);
+
+  if (aubio_filter_set_c_weighting (o, -1) == 0)
+    return 1;
+  if (aubio_filter_set_c_weighting (0, 32000) == 0)
+    return 1;
+
   in->data[impulse_at] = 0.5;
   fvec_print (in);
   aubio_filter_do (o, in);
@@ -15,6 +21,12 @@
   del_aubio_filter (o);
 
   o = new_aubio_filter_a_weighting (32000);
+
+  if (aubio_filter_set_a_weighting (o, -1) == 0)
+    return 1;
+  if (aubio_filter_set_a_weighting (0, 32000) == 0)
+    return 1;
+
   in->data[impulse_at] = 0.5;
   fvec_print (in);
   aubio_filter_do_outplace (o, in, out);