ref: d770fd2cb980beea2fa91897dfaea1e620b164a8
parent: 08bd8e03639cc3330390b25e30a6bc9f17333ac1
author: Paul Brossier <piem@piem.org>
date: Tue Oct 15 14:49:00 EDT 2013
tests/src/temporal/test-filter.c: improve
--- a/tests/src/temporal/test-filter.c
+++ b/tests/src/temporal/test-filter.c
@@ -2,12 +2,13 @@
int main ()
{
- uint_t win_s = 32; // window size
+ uint_t win_s = 16; // window size
+ uint_t impulse_at = win_s / 2;
fvec_t *in = new_fvec (win_s); // input buffer
fvec_t *out = new_fvec (win_s); // input buffer
aubio_filter_t *o = new_aubio_filter_c_weighting (44100);
- in->data[12] = 0.5;
+ in->data[impulse_at] = 0.5;
fvec_print (in);
aubio_filter_do (o, in);
fvec_print (in);
@@ -14,13 +15,13 @@
del_aubio_filter (o);
o = new_aubio_filter_a_weighting (32000);
- in->data[12] = 0.5;
+ in->data[impulse_at] = 0.5;
fvec_print (in);
aubio_filter_do_outplace (o, in, out);
fvec_print (out);
aubio_filter_set_a_weighting (o, 32000);
- in->data[12] = 0.5;
+ in->data[impulse_at] = 0.5;
fvec_print (in);
aubio_filter_do_filtfilt (o, in, out);
fvec_print (out);