]> git.sesse.net Git - vlc/blob - modules/audio_filter/equalizer_presets.h
mediacodec: handle error_state in one place
[vlc] / modules / audio_filter / equalizer_presets.h
1 /*****************************************************************************
2  * equalizer_presets.h:
3  *****************************************************************************
4  * Copyright (C) 2004 VLC authors and VideoLAN
5  * $Id$
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef _EQUALIZER_PRESETS_H
25 #define _EQUALIZER_PRESETS_H 1
26
27 /*****************************************************************************
28  * Equalizer presets
29  *****************************************************************************/
30 /* Equalizer presets values are in this file instead of equalizer.c, so you can
31  * get these values even if the equalizer is not enabled.
32  */
33
34 #define EQZ_BANDS_MAX 10
35
36 /* The frequency tables */
37 static const float f_vlc_frequency_table_10b[EQZ_BANDS_MAX] =
38 {
39     60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000,
40 };
41
42 static const float f_iso_frequency_table_10b[EQZ_BANDS_MAX] =
43 {
44     31.25, 62.5, 125, 250, 500, 1000, 2000, 4000, 8000, 16000,
45 };
46
47 #define NB_PRESETS 18
48 static const char *const preset_list[NB_PRESETS] = {
49     "flat", "classical", "club", "dance", "fullbass", "fullbasstreble",
50     "fulltreble", "headphones","largehall", "live", "party", "pop", "reggae",
51     "rock", "ska", "soft", "softrock", "techno"
52 };
53 static const char *const preset_list_text[NB_PRESETS] = {
54     N_("Flat"), N_("Classical"), N_("Club"), N_("Dance"), N_("Full bass"),
55     N_("Full bass and treble"), N_("Full treble"), N_("Headphones"),
56     N_("Large Hall"), N_("Live"), N_("Party"), N_("Pop"), N_("Reggae"),
57     N_("Rock"), N_("Ska"), N_("Soft"), N_("Soft rock"), N_("Techno"),
58 };
59
60 typedef struct
61 {
62     const char psz_name[16];
63     int  i_band;
64     float f_preamp;
65     float f_amp[EQZ_BANDS_MAX];
66 } eqz_preset_t;
67
68 static const eqz_preset_t eqz_preset_10b[NB_PRESETS] =
69 {
70     {
71         "flat", 10, 12.0f,
72         { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f },
73     },
74     {
75         "classical", 10, 12.0f,
76         { -1.11022e-15f, -1.11022e-15f, -1.11022e-15f, -1.11022e-15f,
77           -1.11022e-15f, -1.11022e-15f, -7.2f, -7.2f, -7.2f, -9.6f }
78     },
79     {
80         "club", 10, 6.0f,
81         { -1.11022e-15f, -1.11022e-15f, 8.0f, 5.6f, 5.6f, 5.6f, 3.2f,
82           -1.11022e-15f, -1.11022e-15f, -1.11022e-15f }
83     },
84     {
85         "dance", 10, 5.0f,
86         { 9.6f, 7.2f, 2.4f, -1.11022e-15f, -1.11022e-15f, -5.6f, -7.2f, -7.2f,
87           -1.11022e-15f, -1.11022e-15f }
88     },
89     {
90         "fullbass", 10, 5.0f,
91         { -8.0f, 9.6f, 9.6f, 5.6f, 1.6f, -4.0f, -8.0f, -10.4f, -11.2f, -11.2f }
92     },
93     {
94         "fullbasstreble", 10, 4.0f,
95         { 7.2f, 5.6f, -1.11022e-15f, -7.2f, -4.8f, 1.6f, 8.0f, 11.2f,
96           12.0f, 12.0f }
97     },
98     {
99         "fulltreble", 10, 3.0f,
100         { -9.6f, -9.6f, -9.6f, -4.0f, 2.4f, 11.2f, 16.0f, 16.0f, 16.0f, 16.8f }
101     },
102     {
103         "headphones", 10, 4.0f,
104         { 4.8f, 11.2f, 5.6f, -3.2f, -2.4f, 1.6f, 4.8f, 9.6f, 12.8f, 14.4f }
105     },
106     {
107         "largehall", 10, 5.0f,
108         { 10.4f, 10.4f, 5.6f, 5.6f, -1.11022e-15f, -4.8f, -4.8f, -4.8f,
109           -1.11022e-15f, -1.11022e-15f }
110     },
111     {
112         "live", 10, 7.0f,
113         { -4.8f, -1.11022e-15f, 4.0f, 5.6f, 5.6f, 5.6f, 4.0f, 2.4f,
114           2.4f, 2.4f }
115     },
116     {
117         "party", 10, 6.0f,
118         { 7.2f, 7.2f, -1.11022e-15f, -1.11022e-15f, -1.11022e-15f,
119           -1.11022e-15f, -1.11022e-15f, -1.11022e-15f, 7.2f, 7.2f }
120     },
121     {
122         "pop", 10, 6.0f,
123         { -1.6f, 4.8f, 7.2f, 8.0f, 5.6f, -1.11022e-15f, -2.4f, -2.4f,
124           -1.6f, -1.6f }
125     },
126     {
127         "reggae", 10, 8.0f,
128         { -1.11022e-15f, -1.11022e-15f, -1.11022e-15f, -5.6f, -1.11022e-15f,
129           6.4f, 6.4f, -1.11022e-15f, -1.11022e-15f, -1.11022e-15f }
130     },
131     {
132         "rock", 10, 5.0f,
133         { 8.0f, 4.8f, -5.6f, -8.0f, -3.2f, 4.0f, 8.8f, 11.2f, 11.2f, 11.2f }
134     },
135     {
136         "ska", 10, 6.0f,
137         { -2.4f, -4.8f, -4.0f, -1.11022e-15f, 4.0f, 5.6f, 8.8f, 9.6f,
138           11.2f, 9.6f }
139     },
140     {
141         "soft", 10, 5.0f,
142         { 4.8f, 1.6f, -1.11022e-15f, -2.4f, -1.11022e-15f, 4.0f, 8.0f, 9.6f,
143           11.2f, 12.0f }
144     },
145     {
146         "softrock", 10, 7.0f,
147         { 4.0f, 4.0f, 2.4f, -1.11022e-15f, -4.0f, -5.6f, -3.2f, -1.11022e-15f,
148           2.4f, 8.8f }
149     },
150     {
151         "techno", 10, 5.0f,
152         { 8.0f, 5.6f, -1.11022e-15f, -5.6f, -4.8f, -1.11022e-15f, 8.0f, 9.6f,
153           9.6f, 8.8f }
154     },
155 };
156
157 #endif