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

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 3184468 was 3684ab4, checked in by Paul Brossier <piem@piem.org>, 12 years ago

tests/src/temporal/: improve examples

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