Simplify ad_imaadpcm decode_audio function
[mplayer/glamo.git] / libao2 / audio_out.h
blob5fad39731374031c470541c0dfa887f4a0e66a94
1 #ifndef MPLAYER_AUDIO_OUT_H
2 #define MPLAYER_AUDIO_OUT_H
4 typedef struct ao_info_s
6 /* driver name ("Matrox Millennium G200/G400" */
7 const char *name;
8 /* short name (for config strings) ("mga") */
9 const char *short_name;
10 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
11 const char *author;
12 /* any additional comments */
13 const char *comment;
14 } ao_info_t;
16 /* interface towards mplayer and */
17 typedef struct ao_functions_s
19 ao_info_t *info;
20 int (*control)(int cmd,void *arg);
21 int (*init)(int rate,int channels,int format,int flags);
22 void (*uninit)(int immed);
23 void (*reset)(void);
24 int (*get_space)(void);
25 int (*play)(void* data,int len,int flags);
26 float (*get_delay)(void);
27 void (*pause)(void);
28 void (*resume)(void);
29 } ao_functions_t;
31 /* global data used by mplayer and plugins */
32 typedef struct ao_data_s
34 int samplerate;
35 int channels;
36 int format;
37 int bps;
38 int outburst;
39 int buffersize;
40 int pts;
41 } ao_data_t;
43 extern char *ao_subdevice;
44 extern ao_data_t ao_data;
46 void list_audio_out(void);
47 const ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate,int channels,int format,int flags);
49 // NULL terminated array of all drivers
50 extern const ao_functions_t* const audio_out_drivers[];
52 #define CONTROL_OK 1
53 #define CONTROL_TRUE 1
54 #define CONTROL_FALSE 0
55 #define CONTROL_UNKNOWN -1
56 #define CONTROL_ERROR -2
57 #define CONTROL_NA -3
59 #define AOCONTROL_SET_DEVICE 1
60 #define AOCONTROL_GET_DEVICE 2
61 #define AOCONTROL_QUERY_FORMAT 3 /* test for availabilty of a format */
62 #define AOCONTROL_GET_VOLUME 4
63 #define AOCONTROL_SET_VOLUME 5
64 #define AOCONTROL_SET_PLUGIN_DRIVER 6
65 #define AOCONTROL_SET_PLUGIN_LIST 7
67 #define AOPLAY_FINAL_CHUNK 1
69 typedef struct ao_control_vol_s {
70 float left;
71 float right;
72 } ao_control_vol_t;
74 #endif /* MPLAYER_AUDIO_OUT_H */