source:
tests/src/temporal/test-c_weighting.c
@
a4ec189
Last change on this file since a4ec189 was 158e031, checked in by , 11 years ago | |
---|---|
|
|
File size: 764 bytes |
Rev | Line | |
---|---|---|
[a4364b8] | 1 | #include <aubio.h> |
2 | ||
[158e031] | 3 | int main (void) |
[3684ab4] | 4 | { |
[a4364b8] | 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++ ) { | |
[aea235c] | 12 | f = new_aubio_filter_c_weighting (samplerate); |
[a4364b8] | 13 | del_aubio_filter (f); |
14 | ||
[aea235c] | 15 | f = new_aubio_filter (5); |
[59c046d] | 16 | aubio_filter_set_c_weighting (f, samplerate); |
[a4364b8] | 17 | del_aubio_filter (f); |
18 | } | |
19 | ||
20 | // samplerate unknown | |
[aea235c] | 21 | f = new_aubio_filter_c_weighting (4200); |
[a4364b8] | 22 | del_aubio_filter (f); |
23 | ||
24 | // order to small | |
[aea235c] | 25 | f = new_aubio_filter (2); |
[59c046d] | 26 | aubio_filter_set_c_weighting (f, samplerate); |
[a4364b8] | 27 | del_aubio_filter (f); |
28 | ||
29 | // order to big | |
[aea235c] | 30 | f = new_aubio_filter (12); |
[59c046d] | 31 | aubio_filter_set_c_weighting (f, samplerate); |
[a4364b8] | 32 | del_aubio_filter (f); |
33 | ||
34 | return 0; | |
35 | } | |
36 |
Note: See TracBrowser
for help on using the repository browser.