source: tests/src/temporal/test-c_weighting.c @ df9df98

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since df9df98 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: 760 bytes
Line 
1#include <aubio.h>
2
3int main ()
4{
5  aubio_filter_t * f;
6
7  uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000};
8  uint_t nrates = 6;
9  uint_t samplerate, i = 0;
10
11  for ( samplerate = rates[i]; i < nrates ; i++ ) {
12    f = new_aubio_filter_c_weighting (samplerate);
13    del_aubio_filter (f);
14
15    f = new_aubio_filter (5);
16    aubio_filter_set_c_weighting (f, samplerate);
17    del_aubio_filter (f);
18  }
19
20  // samplerate unknown
21  f = new_aubio_filter_c_weighting (4200);
22  del_aubio_filter (f);
23
24  // order to small
25  f = new_aubio_filter (2);
26  aubio_filter_set_c_weighting (f, samplerate);
27  del_aubio_filter (f);
28
29  // order to big
30  f = new_aubio_filter (12);
31  aubio_filter_set_c_weighting (f, samplerate);
32  del_aubio_filter (f);
33
34  return 0;
35}
36
Note: See TracBrowser for help on using the repository browser.