annotate src/audlegacy/equalizer.c @ 4811:7bf7f83a217e

rename src/audacious src/audlegacy so that both audlegacy and audacious can coexist.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 26 Nov 2008 00:44:56 +0900
parents src/audacious/equalizer.c@7e0685ceeb86
children e286934cd9f2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4706
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
1 /* Audacious - Cross-platform multimedia player
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
2 * Copyright (C) 2005-2008 Audacious development team.
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
3 *
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
6 * the Free Software Foundation; under version 3 of the License.
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
7 *
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
8 * This program is distributed in the hope that it will be useful,
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
11 * GNU General Public License for more details.
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
12 *
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
13 * You should have received a copy of the GNU General Public License
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
14 * along with this program. If not, see <http://www.gnu.org/licenses>.
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
15 *
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
16 * The Audacious team does not consider modular code linking to
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
17 * Audacious or using our public API to be a derived work.
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
18 */
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
19
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
20 #include "equalizer.h"
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
21
4718
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
22 #include "audconfig.h"
4706
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
23 #include "legacy/ui_equalizer.h"
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
24
4718
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
25 gfloat
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
26 equalizer_get_preamp(void)
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
27 {
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
28 return equalizerwin_get_preamp();
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
29 }
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
30
4706
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
31 void
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
32 equalizer_set_preamp(gfloat preamp)
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
33 {
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
34 equalizerwin_set_preamp(preamp);
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
35 }
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
36
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
37 gfloat
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
38 equalizer_get_band(gint band)
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
39 {
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
40 return equalizerwin_get_band(band);
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
41 }
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
42
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
43 void
4718
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
44 equalizer_set_band(gint band, gfloat value)
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
45 {
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
46 equalizerwin_set_band(band, value);
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
47 }
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
48
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
49 gboolean equalizer_get_active(gboolean active)
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
50 {
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
51 return cfg.equalizer_active;
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
52 }
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
53
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
54 void
7e0685ceeb86 simplify equalizer code a bit
mf0102 <0102@gmx.at>
parents: 4706
diff changeset
55 equalizer_set_active(gboolean active)
4706
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
56 {
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
57 equalizerwin_activate(active);
7375fa718dd8 made new equalizer interface that doesn't imply a connection with the UI
mf0102 <0102@gmx.at>
parents:
diff changeset
58 }