include sys/kd.h on non-Linux architectures correctly
[mplayer/greg.git] / mixer.h
blob5a2d0e5027ea1c7d4821c1b69e245bf23a69cc9d
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_MIXER_H
20 #define MPLAYER_MIXER_H
22 #include "libaf/af.h"
23 #include "libao2/audio_out.h"
25 extern char * mixer_device;
26 extern char * mixer_channel;
27 extern int soft_vol;
28 extern float soft_vol_max;
30 typedef struct mixer_s {
31 const ao_functions_t *audio_out;
32 af_stream_t *afilter;
33 int volstep;
34 int muted;
35 float last_l, last_r;
36 } mixer_t;
38 void mixer_getvolume(mixer_t *mixer, float *l, float *r);
39 void mixer_setvolume(mixer_t *mixer, float l, float r);
40 void mixer_incvolume(mixer_t *mixer);
41 void mixer_decvolume(mixer_t *mixer);
42 void mixer_getbothvolume(mixer_t *mixer, float *b);
43 void mixer_mute(mixer_t *mixer);
44 void mixer_getbalance(mixer_t *mixer, float *bal);
45 void mixer_setbalance(mixer_t *mixer, float bal);
47 //void mixer_setbothvolume(int v);
48 #define mixer_setbothvolume(m, v) mixer_setvolume(m, v, v)
50 #endif /* MPLAYER_MIXER_H */