source: tests/src/temporal/test-a_weighting.c @ 986131d

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since 986131d was 986131d, checked in by Eduard Müller <mueller.eduard@googlemail.com>, 7 years ago

Intel IPP support for aubio

See emuell/aubio/ intel_ipp2 for details please

  • Property mode set to 100644
File size: 1.0 KB
Line 
1#include <aubio.h>
2
3int main (void)
4{
5  aubio_init();
6
7  aubio_filter_t * f;
8
9  uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000};
10  uint_t nrates = 6;
11  uint_t samplerate, i = 0;
12
13  for ( samplerate = rates[i]; i < nrates ; i++ ) {
14    f = new_aubio_filter_a_weighting (samplerate);
15    del_aubio_filter (f);
16
17    f = new_aubio_filter (7);
18    aubio_filter_set_a_weighting (f, samplerate);
19    del_aubio_filter (f);
20  }
21
22  // samplerate unknown
23  f = new_aubio_filter_a_weighting (4200);
24  if (!f) {
25    //PRINT_MSG ("failed creating A-weighting filter with samplerate=4200Hz\n");
26  }
27
28  // order to small
29  f = new_aubio_filter (2);
30  if (aubio_filter_set_a_weighting (f, samplerate) != 0) {
31    //PRINT_MSG ("failed setting filter to A-weighting\n");
32  }
33  del_aubio_filter (f);
34
35  // order to big
36  f = new_aubio_filter (12);
37  if (aubio_filter_set_a_weighting (f, samplerate) != 0) {
38    //PRINT_MSG ("failed setting filter to A-weighting\n");
39  }
40  del_aubio_filter (f);
41
42  aubio_cleanup();
43 
44  return 0;
45}
46
Note: See TracBrowser for help on using the repository browser.