source:
tests/src/temporal/test-a_weighting.c
@
5525507
Last change on this file since 5525507 was 158e031, checked in by , 11 years ago | |
---|---|
|
|
File size: 767 bytes |
Rev | Line | |
---|---|---|
[a4364b8] | 1 | #include <aubio.h> |
2 | ||
[158e031] | 3 | int main (void) |
[3684ab4] | 4 | { |
[a4364b8] | 5 | |
6 | aubio_filter_t * f; | |
7 | ||
8 | uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000}; | |
9 | uint_t nrates = 6; | |
10 | uint_t samplerate, i = 0; | |
11 | ||
12 | for ( samplerate = rates[i]; i < nrates ; i++ ) { | |
[aea235c] | 13 | f = new_aubio_filter_a_weighting (samplerate); |
[a4364b8] | 14 | del_aubio_filter (f); |
15 | ||
[aea235c] | 16 | f = new_aubio_filter (7); |
[59c046d] | 17 | aubio_filter_set_a_weighting (f, samplerate); |
[a4364b8] | 18 | del_aubio_filter (f); |
19 | } | |
20 | ||
21 | // samplerate unknown | |
[aea235c] | 22 | f = new_aubio_filter_a_weighting (4200); |
[a4364b8] | 23 | del_aubio_filter (f); |
24 | ||
25 | // order to small | |
[aea235c] | 26 | f = new_aubio_filter (2); |
[59c046d] | 27 | aubio_filter_set_a_weighting (f, samplerate); |
[a4364b8] | 28 | del_aubio_filter (f); |
29 | ||
30 | // order to big | |
[aea235c] | 31 | f = new_aubio_filter (12); |
[59c046d] | 32 | aubio_filter_set_a_weighting (f, samplerate); |
[a4364b8] | 33 | del_aubio_filter (f); |
34 | ||
35 | return 0; | |
36 | } | |
37 |
Note: See TracBrowser
for help on using the repository browser.