0
|
1 /* XMMS - Software volume managment.
|
|
2 * Copyright (C) 2001-2003 Matthieu Sozeau
|
|
3 * Original implementation from a patch by Tomas Simonaitis <haden@homelan.lt>
|
|
4 *
|
|
5 * This program is free software; you can redistribute it and/or modify
|
|
6 * it under the terms of the GNU General Public License as published by
|
|
7 * the Free Software Foundation; either version 2 of the License, or
|
|
8 * (at your option) any later version.
|
|
9 *
|
|
10 * This program is distributed in the hope that it will be useful,
|
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 * GNU General Public License for more details.
|
|
14 *
|
|
15 * You should have received a copy of the GNU General Public License
|
|
16 * along with this program; if not, write to the Free Software
|
|
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
18 */
|
|
19
|
|
20 #ifndef SOFTVOLUME_H
|
|
21 #define SOFTVOLUME_H
|
|
22
|
|
23 #include "plugin.h" /* glib and AFomat definition */
|
|
24
|
|
25 struct _SoftVolumeConfig {
|
|
26 gboolean enabled;
|
|
27 gint volume_left;
|
|
28 gint volume_right;
|
|
29 };
|
|
30
|
|
31 typedef struct _SoftVolumeConfig SoftVolumeConfig;
|
|
32
|
|
33 /**************************************************************************
|
|
34 *
|
|
35 * Functions to read/write a particular soft volume configuration.
|
|
36 * If section is NULL, the global ("xmms") section is used.
|
|
37 *
|
|
38 **************************************************************************/
|
|
39
|
|
40 void soft_volume_load(const gchar * section, SoftVolumeConfig * c);
|
|
41
|
|
42 void soft_volume_save(SoftVolumeConfig * c, const gchar * section);
|
|
43
|
|
44
|
|
45 /**************************************************************************
|
|
46 *
|
|
47 * Functions to set the volume and get the current volume
|
|
48 *
|
|
49 **************************************************************************/
|
|
50
|
|
51 void soft_volume_set(SoftVolumeConfig * c, gint l, gint r);
|
|
52
|
|
53 void soft_volume_get(SoftVolumeConfig * c, gint * l, gint * r);
|
|
54
|
|
55
|
|
56 /**************************************************************************
|
|
57 *
|
|
58 * Modify the buffer according to volume settings
|
|
59 *
|
|
60 **************************************************************************/
|
|
61
|
|
62 void soft_volume_effect(SoftVolumeConfig * c,
|
|
63 gpointer data, AFormat format, gint length);
|
|
64
|
|
65 #endif
|