[tests] [filterbank] add get/set power/norm calls
authorPaul Brossier <piem@piem.org>
Sat, 17 Nov 2018 13:18:38 +0000 (14:18 +0100)
committerPaul Brossier <piem@piem.org>
Sat, 17 Nov 2018 13:18:38 +0000 (14:18 +0100)
tests/src/spectral/test-filterbank.c

index 543226d..8b487c2 100644 (file)
@@ -11,6 +11,15 @@ int main (void)
   // create filterbank object
   aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
 
+  smpl_t power = aubio_filterbank_get_power(o);
+  smpl_t norm = aubio_filterbank_get_norm(o);
+  if (aubio_filterbank_set_power(o, power)) {
+    return 1;
+  }
+  if (aubio_filterbank_set_norm(o, norm)) {
+    return 1;
+  }
+
   // apply filterbank ten times
   uint_t n = 10;
   while (n) {