Mercurial > mplayer.hg
annotate libao2/audio_out.h @ 6965:f8ea0af8edb0
optimization
author | michael |
---|---|
date | Sun, 11 Aug 2002 10:12:15 +0000 |
parents | 776b686069af |
children | e9e4398029de |
rev | line source |
---|---|
6795 | 1 |
2 #ifndef __AUDIO_OUT_H | |
3 #define __AUDIO_OUT_H | |
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; |
21 int (*control)(int cmd,int arg); | |
22 int (*init)(int rate,int channels,int format,int flags); | |
23 void (*uninit)(); | |
24 void (*reset)(); | |
1127
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
25 int (*get_space)(); |
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); |
3095 | 27 float (*get_delay)(); |
1127
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
28 void (*pause)(); |
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
29 void (*resume)(); |
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 | |
1127
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
47 // prototypes |
ca1bc9edf735
audio_out_format_name prototype added, ao_control_vol_t for aocontrol_get/set_volume added
al3x
parents:
1048
diff
changeset
|
48 extern char *audio_out_format_name(int format); |
6026 | 49 extern int audio_out_format_bits(int format); |
954 | 50 |
51 // NULL terminated array of all drivers | |
52 extern ao_functions_t* audio_out_drivers[]; | |
53 | |
54 | |
55 #define CONTROL_OK 1 | |
56 #define CONTROL_TRUE 1 | |
57 #define CONTROL_FALSE 0 | |
58 #define CONTROL_UNKNOWN -1 | |
59 #define CONTROL_ERROR -2 | |
60 #define CONTROL_NA -3 | |
61 | |
62 #define AOCONTROL_SET_DEVICE 1 | |
1048 | 63 #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
|
64 #define AOCONTROL_QUERY_FORMAT 3 /* test for availabilty of a format */ |
1048 | 65 #define AOCONTROL_GET_VOLUME 4 |
66 #define AOCONTROL_SET_VOLUME 5 | |
3107 | 67 #define AOCONTROL_SET_PLUGIN_DRIVER 6 |
68 #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
|
69 |
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 |
6795 | 75 #endif |