Added note about 2.5 being Archos only
[kugel-rb.git] / apps / eq.h
blob9228658eca0eb805d19aac22b593f03ee858fee6
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2006 Thom Johansen
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.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _EQ_H
21 #define _EQ_H
23 #include <inttypes.h>
25 /* These depend on the fixed point formats used by the different filter types
26 and need to be changed when they change.
28 #define EQ_PEAK_SHIFT 4
29 #define EQ_SHELF_SHIFT 8
31 struct eqfilter {
32 int32_t coefs[5]; /* Order is b0, b1, b2, a1, a2 */
33 int32_t history[2][4];
36 void eq_pk_coefs(unsigned long cutoff, unsigned long Q, long db, long *c);
37 void eq_ls_coefs(unsigned long cutoff, unsigned long Q, long db, long *c);
38 void eq_hs_coefs(unsigned long cutoff, unsigned long Q, long db, long *c);
39 void eq_filter(int32_t **x, struct eqfilter *f, unsigned num,
40 unsigned channels, unsigned shift);
42 #endif