diff options
Diffstat (limited to 'apps/eq.h')
-rw-r--r-- | apps/eq.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/apps/eq.h b/apps/eq.h new file mode 100644 index 0000000000..f7616387b4 --- /dev/null +++ b/apps/eq.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 Thom Johansen | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef _EQ_H | ||
21 | #define _EQ_H | ||
22 | |||
23 | /* These depend on the fixed point formats used by the different filter types | ||
24 | and need to be changed when they change. | ||
25 | */ | ||
26 | #define EQ_PEAK_SHIFT 3 | ||
27 | #define EQ_SHELF_SHIFT 7 | ||
28 | |||
29 | struct eqfilter { | ||
30 | long coefs[5]; /* Order is b0, b1, b2, a1, a2 */ | ||
31 | long history[2][4]; | ||
32 | }; | ||
33 | |||
34 | void eq_pk_coefs(unsigned long cutoff, unsigned long Q, long db, long *c); | ||
35 | void eq_ls_coefs(unsigned long cutoff, unsigned long Q, long db, long *c); | ||
36 | void eq_hs_coefs(unsigned long cutoff, unsigned long Q, long db, long *c); | ||
37 | void eq_filter(long **x, struct eqfilter *f, unsigned num, | ||
38 | unsigned samples, unsigned shift); | ||
39 | |||
40 | #endif | ||
41 | |||