Mercurial > mplayer.hg
annotate mixer.h @ 21077:7f3cccd16b26
Reorganize code to move more things out of main().
author | uau |
---|---|
date | Mon, 20 Nov 2006 09:12:07 +0000 |
parents | 75b84965d137 |
children | 519e42b716aa |
rev | line source |
---|---|
441 | 1 #ifndef __MPLAYER_MIXER |
2 #define __MPLAYER_MIXER | |
3 | |
12672
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
4 #include "libaf/af.h" |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
5 #include "libao2/audio_out.h" |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
6 |
441 | 7 extern char * mixer_device; |
11837 | 8 extern char * mixer_channel; |
13933
75b84965d137
allow forcing of software volume control and setting maximum amplification.
reimar
parents:
12672
diff
changeset
|
9 extern int soft_vol; |
75b84965d137
allow forcing of software volume control and setting maximum amplification.
reimar
parents:
12672
diff
changeset
|
10 extern float soft_vol_max; |
441 | 11 |
12672
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
12 typedef struct mixer_s { |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
13 ao_functions_t *audio_out; |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
14 af_stream_t *afilter; |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
15 int volstep; |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
16 int muted; |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
17 float last_l, last_r; |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
18 } mixer_t; |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
19 |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
20 void mixer_getvolume(mixer_t *mixer, float *l, float *r); |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
21 void mixer_setvolume(mixer_t *mixer, float l, float r); |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
22 void mixer_incvolume(mixer_t *mixer); |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
23 void mixer_decvolume(mixer_t *mixer); |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
24 void mixer_getbothvolume(mixer_t *mixer, float *b); |
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
25 void mixer_mute(mixer_t *mixer); |
441 | 26 |
27 //extern void mixer_setbothvolume( int v ); | |
12672
9709ce101949
New 'Mixer API' with ability to change volume through libaf (this part was written by Reimar Doffinger) and lesser global variables
alex
parents:
11837
diff
changeset
|
28 #define mixer_setbothvolume(m, v) mixer_setvolume(m, v, v) |
441 | 29 |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
441
diff
changeset
|
30 #endif |