source: tests/src/temporal/test-filter.c @ f7e30e8

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampleryinfft+
Last change on this file since f7e30e8 was 158e031, checked in by Paul Brossier <piem@piem.org>, 11 years ago

tests/: add void to prototypes to build with -Wstrict-prototypes

  • Property mode set to 100644
File size: 790 bytes
Line 
1#include <aubio.h>
2
3int main (void)
4{
5  uint_t win_s = 16; // window size
6  uint_t impulse_at = win_s / 2;
7  fvec_t *in = new_fvec (win_s); // input buffer
8  fvec_t *out = new_fvec (win_s); // input buffer
9
10  aubio_filter_t *o = new_aubio_filter_c_weighting (44100);
11  in->data[impulse_at] = 0.5;
12  fvec_print (in);
13  aubio_filter_do (o, in);
14  fvec_print (in);
15  del_aubio_filter (o);
16
17  o = new_aubio_filter_a_weighting (32000);
18  in->data[impulse_at] = 0.5;
19  fvec_print (in);
20  aubio_filter_do_outplace (o, in, out);
21  fvec_print (out);
22
23  aubio_filter_set_a_weighting (o, 32000);
24  in->data[impulse_at] = 0.5;
25  fvec_print (in);
26  aubio_filter_do_filtfilt (o, in, out);
27  fvec_print (out);
28
29  del_fvec (in);
30  del_fvec (out);
31  del_aubio_filter (o);
32  aubio_cleanup ();
33
34  return 0;
35}
Note: See TracBrowser for help on using the repository browser.