Line | |
---|
1 | //libroardsp.h: |
---|
2 | |
---|
3 | #ifndef _LIBROARDSP_H_ |
---|
4 | #define _LIBROARDSP_H_ |
---|
5 | |
---|
6 | #include <roaraudio.h> |
---|
7 | |
---|
8 | // defines |
---|
9 | #define ROARDSP_MAX_FILTERS_PER_CHAIN 8 |
---|
10 | |
---|
11 | // types: |
---|
12 | |
---|
13 | struct roardsp_filter { |
---|
14 | int channels; |
---|
15 | int bits; |
---|
16 | void * inst; |
---|
17 | int (*calc )(struct roardsp_filter * filter, void * data, size_t samples); |
---|
18 | int (*uninit)(struct roardsp_filter * filter); |
---|
19 | }; |
---|
20 | |
---|
21 | struct roardsp_filterchain { |
---|
22 | int filters; |
---|
23 | struct roardsp_filter * filter[ROARDSP_MAX_FILTERS_PER_CHAIN]; |
---|
24 | }; |
---|
25 | |
---|
26 | struct roardsp_lowp { |
---|
27 | uint32_t freq; // in mHz (0Hz..4MHz) |
---|
28 | uint16_t a, b; |
---|
29 | int32_t old[ROAR_MAX_CHANNELS]; |
---|
30 | }; |
---|
31 | |
---|
32 | // funcs: |
---|
33 | int roardsp_filter_init (struct roardsp_filter * filter, struct roar_stream * stream, int id); |
---|
34 | int roardsp_filter_uninit(struct roardsp_filter * filter); |
---|
35 | int roardsp_filter_calc (struct roardsp_filter * filter, void * data, size_t len); |
---|
36 | |
---|
37 | int roardsp_fchain_init (struct roardsp_filterchain * chain); |
---|
38 | int roardsp_fchain_uninit(struct roardsp_filterchain * chain); |
---|
39 | int roardsp_fchain_add (struct roardsp_filterchain * chain, struct roardsp_filter * filter); |
---|
40 | int roardsp_fchain_calc (struct roardsp_filterchain * chain, void * data, size_t len); |
---|
41 | |
---|
42 | #endif |
---|
43 | |
---|
44 | //ll |
---|
Note: See
TracBrowser
for help on using the repository browser.