954
|
1
|
|
2 typedef struct ao_info_s
|
|
3 {
|
|
4 /* driver name ("Matrox Millennium G200/G400" */
|
|
5 const char *name;
|
|
6 /* short name (for config strings) ("mga") */
|
|
7 const char *short_name;
|
|
8 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
|
|
9 const char *author;
|
|
10 /* any additional comments */
|
|
11 const char *comment;
|
|
12 } ao_info_t;
|
|
13
|
|
14 typedef struct ao_functions_s {
|
|
15
|
|
16 ao_info_t *info;
|
|
17
|
|
18 /*
|
|
19 */
|
|
20 int (*control)(int cmd,int arg);
|
|
21
|
|
22 /*
|
|
23 */
|
|
24 int (*init)(int rate,int channels,int format,int flags);
|
|
25
|
|
26 /*
|
|
27 */
|
|
28 void (*uninit)();
|
|
29
|
|
30 /*
|
|
31 */
|
|
32 void (*reset)();
|
|
33
|
|
34 /*
|
|
35 */
|
|
36 int (*get_space)();
|
|
37
|
|
38 /*
|
|
39 */
|
|
40 int (*play)(void* data,int len,int flags);
|
|
41
|
|
42 /*
|
|
43 */
|
|
44 int (*get_delay)();
|
|
45
|
|
46 } ao_functions_t;
|
|
47
|
|
48 // NULL terminated array of all drivers
|
|
49 extern ao_functions_t* audio_out_drivers[];
|
|
50
|
|
51 extern int ao_samplerate;
|
|
52 extern int ao_channels;
|
|
53 extern int ao_format;
|
|
54 extern int ao_bps;
|
|
55 extern int ao_outburst;
|
|
56 extern int ao_buffersize;
|
|
57
|
|
58 #define CONTROL_OK 1
|
|
59 #define CONTROL_TRUE 1
|
|
60 #define CONTROL_FALSE 0
|
|
61 #define CONTROL_UNKNOWN -1
|
|
62 #define CONTROL_ERROR -2
|
|
63 #define CONTROL_NA -3
|
|
64
|
|
65 #define AOCONTROL_SET_DEVICE 1
|
|
66 #define AOCONTROL_QUERY_FORMAT 2
|
|
67
|
|
68
|