Mercurial > audlegacy
annotate src/audacious/iir.h @ 3549:a5b1084e7f38 trunk
C99 initialisers
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Tue, 18 Sep 2007 11:58:09 -0500 |
parents | 3b6d316f8b09 |
children | 154f21dcd61e |
rev | line source |
---|---|
2313 | 1 /* |
2 * PCM time-domain equalizer | |
3 * | |
4 * Copyright (C) 2002-2005 Felipe Rivera <liebremx at users.sourceforge.net> | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
2313
diff
changeset
|
8 * the Free Software Foundation; either version 3 of the License, or |
2313 | 9 * (at your option) any later version. |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
2313
diff
changeset
|
17 * along with this program. If not, see <http://www.gnu.org/licenses>. |
2313 | 18 * |
19 * $Id: iir.h,v 1.12 2005/10/17 01:57:59 liebremx Exp $ | |
20 */ | |
21 #ifndef IIR_H | |
22 #define IIR_H | |
23 | |
24 #include <glib.h> | |
25 #include "main.h" | |
26 #include "iir_cfs.h" | |
27 | |
28 /* | |
29 * Flush-to-zero to avoid flooding the CPU with underflow exceptions | |
30 */ | |
31 #ifdef SSE_MATH | |
32 #define FTZ 0x8000 | |
33 #define FTZ_ON { \ | |
34 unsigned int mxcsr; \ | |
35 __asm__ __volatile__ ("stmxcsr %0" : "=m" (*&mxcsr)); \ | |
36 mxcsr |= FTZ; \ | |
37 __asm__ __volatile__ ("ldmxcsr %0" : : "m" (*&mxcsr)); \ | |
38 } | |
39 #define FTZ_OFF { \ | |
40 unsigned int mxcsr; \ | |
41 __asm__ __volatile__ ("stmxcsr %0" : "=m" (*&mxcsr)); \ | |
42 mxcsr &= ~FTZ; \ | |
43 __asm__ __volatile__ ("ldmxcsr %0" : : "m" (*&mxcsr)); \ | |
44 } | |
45 #else | |
46 #define FTZ_ON | |
47 #define FTZ_OFF | |
48 #endif | |
49 | |
50 /* | |
51 * Function prototypes | |
52 */ | |
53 extern void init_iir(); | |
54 extern void clean_history(); | |
55 extern void set_gain(gint index, gint chn, float val); | |
56 extern void set_preamp(gint chn, float val); | |
57 | |
58 | |
59 extern int iir(gpointer * d, gint length, gint nch); | |
60 | |
61 #ifdef ARCH_X86 | |
62 extern int round_trick(float floatvalue_to_round); | |
63 #endif | |
64 #ifdef ARCH_PPC | |
65 extern int round_ppc(float x); | |
66 #endif | |
67 | |
68 #define EQ_CHANNELS 2 | |
69 #define EQ_MAX_BANDS 10 | |
70 | |
71 extern float preamp[EQ_CHANNELS]; | |
72 extern sIIRCoefficients *iir_cf; | |
73 extern gint rate; | |
74 extern gint band_count; | |
75 | |
76 #ifdef BENCHMARK | |
77 extern double timex; | |
78 extern int count; | |
79 extern unsigned int blength; | |
80 #endif | |
81 | |
82 #endif /* #define IIR_H */ | |
83 |