]> git.sesse.net Git - vlc/blob - modules/audio_filter/equalizer_presets.h
Use var_Inherit* instead of var_CreateGet*.
[vlc] / modules / audio_filter / equalizer_presets.h
1 /*****************************************************************************
2  * equalizer_presets.h:
3  *****************************************************************************
4  * Copyright (C) 2004 the VideoLAN team
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
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 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 General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Equalizer presets
26  *****************************************************************************/
27 /* Equalizer presets values are in this file instead of equalizer.c, so you can
28  * get these values even if the equalizer is not enabled.
29  */
30
31 #define EQZ_BANDS_MAX 10
32
33 #define NB_PRESETS 18
34 static const char *const preset_list[] = {
35     "flat", "classical", "club", "dance", "fullbass", "fullbasstreble",
36     "fulltreble", "headphones","largehall", "live", "party", "pop", "reggae",
37     "rock", "ska", "soft", "softrock", "techno"
38 };
39 static const char *const preset_list_text[] = {
40     N_("Flat"), N_("Classical"), N_("Club"), N_("Dance"), N_("Full bass"),
41     N_("Full bass and treble"), N_("Full treble"), N_("Headphones"),
42     N_("Large Hall"), N_("Live"), N_("Party"), N_("Pop"), N_("Reggae"),
43     N_("Rock"), N_("Ska"), N_("Soft"), N_("Soft rock"), N_("Techno"),
44 };
45
46 typedef struct
47 {
48     const char *psz_name;
49     int  i_band;
50     float f_preamp;
51     float f_amp[EQZ_BANDS_MAX];
52 } eqz_preset_t;
53
54 static const eqz_preset_t eqz_preset_flat_10b=
55 {
56     "flat", 10, 12.0,
57     { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 },
58 };
59 static const eqz_preset_t eqz_preset_classical_10b=
60 {
61     "classical", 10, 12.0,
62     { -1.11022e-15, -1.11022e-15, -1.11022e-15, -1.11022e-15, -1.11022e-15, -1.11022e-15, -7.2, -7.2, -7.2, -9.6 }
63 };
64 static const eqz_preset_t eqz_preset_club_10b=
65 {
66     "club", 10, 6.0,
67     { -1.11022e-15, -1.11022e-15, 8, 5.6, 5.6, 5.6, 3.2, -1.11022e-15, -1.11022e-15, -1.11022e-15 }
68 };
69 static const eqz_preset_t eqz_preset_dance_10b=
70 {
71     "dance", 10, 5.0,
72     { 9.6, 7.2, 2.4, -1.11022e-15, -1.11022e-15, -5.6, -7.2, -7.2, -1.11022e-15, -1.11022e-15 }
73 };
74 static const eqz_preset_t eqz_preset_fullbass_10b=
75 {
76     "fullbass", 10, 5.0,
77     { -8, 9.6, 9.6, 5.6, 1.6, -4, -8, -10.4, -11.2, -11.2  }
78 };
79 static const eqz_preset_t eqz_preset_fullbasstreble_10b=
80 {
81     "fullbasstreble", 10, 4.0,
82     { 7.2, 5.6, -1.11022e-15, -7.2, -4.8, 1.6, 8, 11.2, 12, 12 }
83 };
84
85 static const eqz_preset_t eqz_preset_fulltreble_10b=
86 {
87     "fulltreble", 10, 3.0,
88     { -9.6, -9.6, -9.6, -4, 2.4, 11.2, 16, 16, 16, 16.8 }
89 };
90 static const eqz_preset_t eqz_preset_headphones_10b=
91 {
92     "headphones", 10, 4.0,
93     { 4.8, 11.2, 5.6, -3.2, -2.4, 1.6, 4.8, 9.6, 12.8, 14.4 }
94 };
95 static const eqz_preset_t eqz_preset_largehall_10b=
96 {
97     "largehall", 10, 5.0,
98     { 10.4, 10.4, 5.6, 5.6, -1.11022e-15, -4.8, -4.8, -4.8, -1.11022e-15, -1.11022e-15 }
99 };
100 static const eqz_preset_t eqz_preset_live_10b=
101 {
102     "live", 10, 7.0,
103     { -4.8, -1.11022e-15, 4, 5.6, 5.6, 5.6, 4, 2.4, 2.4, 2.4 }
104 };
105 static const eqz_preset_t eqz_preset_party_10b=
106 {
107     "party", 10, 6.0,
108     { 7.2, 7.2, -1.11022e-15, -1.11022e-15, -1.11022e-15, -1.11022e-15, -1.11022e-15, -1.11022e-15, 7.2, 7.2 }
109 };
110 static const eqz_preset_t eqz_preset_pop_10b=
111 {
112     "pop", 10, 6.0,
113     { -1.6, 4.8, 7.2, 8, 5.6, -1.11022e-15, -2.4, -2.4, -1.6, -1.6 }
114 };
115 static const eqz_preset_t eqz_preset_reggae_10b=
116 {
117     "reggae", 10, 8.0,
118     { -1.11022e-15, -1.11022e-15, -1.11022e-15, -5.6, -1.11022e-15, 6.4, 6.4, -1.11022e-15, -1.11022e-15, -1.11022e-15 }
119 };
120 static const eqz_preset_t eqz_preset_rock_10b=
121 {
122     "rock", 10, 5.0,
123     { 8, 4.8, -5.6, -8, -3.2, 4, 8.8, 11.2, 11.2, 11.2 }
124 };
125 static const eqz_preset_t eqz_preset_ska_10b=
126 {
127     "ska", 10, 6.0,
128     { -2.4, -4.8, -4, -1.11022e-15, 4, 5.6, 8.8, 9.6, 11.2, 9.6 }
129 };
130 static const eqz_preset_t eqz_preset_soft_10b=
131 {
132     "soft", 10, 5.0,
133     { 4.8, 1.6, -1.11022e-15, -2.4, -1.11022e-15, 4, 8, 9.6, 11.2, 12 }
134 };
135 static const eqz_preset_t eqz_preset_softrock_10b=
136 {
137     "softrock", 10, 7.0,
138     { 4, 4, 2.4, -1.11022e-15, -4, -5.6, -3.2, -1.11022e-15, 2.4, 8.8 }
139 };
140 static const eqz_preset_t eqz_preset_techno_10b=
141 {
142     "techno", 10, 5.0,
143     { 8, 5.6, -1.11022e-15, -5.6, -4.8, -1.11022e-15, 8, 9.6, 9.6, 8.8 }
144 };
145
146 static const eqz_preset_t *eqz_preset_10b[] =
147 {
148     &eqz_preset_flat_10b,
149     &eqz_preset_classical_10b,
150     &eqz_preset_club_10b,
151     &eqz_preset_dance_10b,
152     &eqz_preset_fullbass_10b,
153     &eqz_preset_fullbasstreble_10b,
154     &eqz_preset_fulltreble_10b,
155     &eqz_preset_headphones_10b,
156     &eqz_preset_largehall_10b,
157     &eqz_preset_live_10b,
158     &eqz_preset_party_10b,
159     &eqz_preset_pop_10b,
160     &eqz_preset_reggae_10b,
161     &eqz_preset_rock_10b,
162     &eqz_preset_ska_10b,
163     &eqz_preset_soft_10b,
164     &eqz_preset_softrock_10b,
165     &eqz_preset_techno_10b,
166     NULL
167 };
168
169
170