1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
| /*
| * eq.h
| * Description:
| *
| * Created on: 2014-10-8
| * Author: Graydon
| * Modify:
| */
|
| #ifndef EQ_H_
| #define EQ_H_
|
| typedef enum {
| eq_lpf,
| eq_hpf,
| eq_bpf_pq, //(constant skirt gain, peak gain = Q)
| eq_bpf_zero, //(constant 0 dB peak gain)
| eq_notch,
| eq_apf,
| eq_peaking_eq, //peq_peak_3dB
| eq_lowshelf,
| eq_highshelf,
| eq_geq,
| eq_constQ, //peq_zero_3dB
| eq_count,
| }eq_type_t;
|
| typedef enum{
| peq_zero_3dB, //bw at 3dB frequency
| peq_middle,
| peq_peak_3dB, //bw at above or below peaking 3dB frequency
| }peq_bw;
|
| /*description: Create ParametricEQ handle.
| *@param1: sample rate
| *@param2: sample number per frame
| *@param3: The number of ParametricEQ sections
| *return: The handle
| */
| void* alg_eq_create(int smpRate,int smpNum,int nsections);
|
| /*description: ParametricEQ handle.
| *@param1: sample rate
| *return: none
| */
| void alg_eq_destroy(void* h);
|
| /*description: Set ParametricEQ 's param.
| *@param1: ParametricEQ handle
| *@param2: select the section from total sections of ParametricEQ
| *@param3: ParametricEQ's frequency
| *@param4: ParametricEQ's Gain
| *@param5: ParametricEQ's Q
| *return: None
| */
| void alg_eq_set_param(void* h,int nsection,eq_type_t type ,int bypass,float freqency,float gain,float Q);
|
| /*description: ParametricEQ process function.
| *@param1: ParametricEQ handle
| *@param2: audio data Input
| *@param3: proceeded data output
| *return: 0-successful
| */
| int alg_eq_filter(void* h , const float *data_in, float *data_out);
|
| void callEQcoeffs(eq_type_t type , float f0,float g,float q,int fs, __OUT float *b,__OUT float *a);
| void call_peaking_eq2(peq_bw bw_type ,float fc, float gain, float q, int fs, __OUT float *coef_b, __OUT float *coef_a);
| void alg_eq_acc_coeffs(int smpRate, int nsection ,eq_type_t type,float freqency,float gain,float q, __OUT float* pcoeffs);
|
| #endif /* EQ_H_ */
|
|