Mercurial > mplayer.hg
annotate libao2/audio_out.h @ 25647:e93a3c68757f
Slightly simplify read_buffer code
author | reimar |
---|---|
date | Fri, 11 Jan 2008 20:32:42 +0000 |
parents | 3baf6a2283da |
children | 21a1dc062bc5 |
rev | line source |
---|---|
6795 | 1 |
23689
3f0d00abc073
Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents:
18735
diff
changeset
|
2 #ifndef AUDIO_OUT_H |
3f0d00abc073
Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents:
18735
diff
changeset
|
3 #define AUDIO_OUT_H |
6795 | 4 |
954 | 5 typedef struct ao_info_s |
6 { | |
7 /* driver name ("Matrox Millennium G200/G400" */ | |
8 const char *name; | |
9 /* short name (for config strings) ("mga") */ | |
10 const char *short_name; | |
11 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */ | |
12 const char *author; | |
13 /* any additional comments */ | |
14 const char *comment; | |
15 } ao_info_t; | |
16 | |
3095 | 17 /* interface towards mplayer and */ |
1127
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
18 typedef struct ao_functions_s |
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
19 { |
954 | 20 ao_info_t *info; |
9633
12b1790038b0
64bit libao2 fix by Jens Axboe <mplayer-dev@kernel.dk>
alex
parents:
7563
diff
changeset
|
21 int (*control)(int cmd,void *arg); |
954 | 22 int (*init)(int rate,int channels,int format,int flags); |
12145 | 23 void (*uninit)(int immed); |
17566
f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents:
14618
diff
changeset
|
24 void (*reset)(void); |
f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents:
14618
diff
changeset
|
25 int (*get_space)(void); |
1127
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
26 int (*play)(void* data,int len,int flags); |
17566
f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents:
14618
diff
changeset
|
27 float (*get_delay)(void); |
f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents:
14618
diff
changeset
|
28 void (*pause)(void); |
f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents:
14618
diff
changeset
|
29 void (*resume)(void); |
1127
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
30 } ao_functions_t; |
954 | 31 |
3095 | 32 /* global data used by mplayer and plugins */ |
33 typedef struct ao_data_s | |
34 { | |
35 int samplerate; | |
36 int channels; | |
37 int format; | |
38 int bps; | |
39 int outburst; | |
40 int buffersize; | |
41 int pts; | |
42 } ao_data_t; | |
43 | |
44 extern char *ao_subdevice; | |
45 extern ao_data_t ao_data; | |
46 | |
17566
f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents:
14618
diff
changeset
|
47 void list_audio_out(void); |
7563
e9e4398029de
audio out driver list support (example: -ao alsa9,sdl:esd,oss,sdl:oss,)
arpi
parents:
6795
diff
changeset
|
48 ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate,int channels,int format,int flags); |
e9e4398029de
audio out driver list support (example: -ao alsa9,sdl:esd,oss,sdl:oss,)
arpi
parents:
6795
diff
changeset
|
49 |
954 | 50 // NULL terminated array of all drivers |
51 extern ao_functions_t* audio_out_drivers[]; | |
52 | |
53 #define CONTROL_OK 1 | |
54 #define CONTROL_TRUE 1 | |
55 #define CONTROL_FALSE 0 | |
56 #define CONTROL_UNKNOWN -1 | |
57 #define CONTROL_ERROR -2 | |
58 #define CONTROL_NA -3 | |
59 | |
60 #define AOCONTROL_SET_DEVICE 1 | |
1048 | 61 #define AOCONTROL_GET_DEVICE 2 |
1127
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
62 #define AOCONTROL_QUERY_FORMAT 3 /* test for availabilty of a format */ |
1048 | 63 #define AOCONTROL_GET_VOLUME 4 |
64 #define AOCONTROL_SET_VOLUME 5 | |
3107 | 65 #define AOCONTROL_SET_PLUGIN_DRIVER 6 |
66 #define AOCONTROL_SET_PLUGIN_LIST 7 | |
1127
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
67 |
18735
93dd2847bcdc
Rewrite audio EOF handling logic fixing some problems that could cause
uau
parents:
17566
diff
changeset
|
68 #define AOPLAY_FINAL_CHUNK 1 |
93dd2847bcdc
Rewrite audio EOF handling logic fixing some problems that could cause
uau
parents:
17566
diff
changeset
|
69 |
1127
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
70 typedef struct ao_control_vol_s { |
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
71 float left; |
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
72 float right; |
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
73 } ao_control_vol_t; |
3107 | 74 |
25535
3baf6a2283da
Add explanatory comments to the #endif part of multiple inclusion guards.
diego
parents:
23689
diff
changeset
|
75 #endif /* AUDIO_OUT_H */ |