Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* |
2 | * Audio 'LIB' defines |
||
3 | */ |
||
4 | |||
5 | enum { AUDIO_OUT_HEADPHONES,AUDIO_OUT_INTERNAL_SPEAKER,AUDIO_OUT_LINE_OUT }; |
||
6 | enum { DECODE_TEST, DECODE_AUDIO, DECODE_STDOUT, DECODE_BUFFER }; |
||
7 | |||
8 | #define AUDIO_FORMAT_SIGNED_16 0x1 |
||
9 | #define AUDIO_FORMAT_UNSIGNED_8 0x2 |
||
10 | #define AUDIO_FORMAT_SIGNED_8 0x4 |
||
11 | #define AUDIO_FORMAT_ULAW_8 0x8 |
||
12 | #define AUDIO_FORMAT_ALAW_8 0x10 |
||
13 | |||
14 | #if defined(HPUX) || defined(SUNOS) || defined(SOLARIS) || defined(VOXWARE) |
||
15 | #define AUDIO_USES_FD |
||
16 | #endif |
||
17 | |||
18 | struct audio_info_struct |
||
19 | { |
||
20 | #ifdef AUDIO_USES_FD |
||
21 | int fn; /* filenumber */ |
||
22 | #endif |
||
23 | #ifdef SGI |
||
24 | ALconfig config; |
||
25 | ALport port; |
||
26 | #endif |
||
27 | long rate; |
||
28 | int gain; |
||
29 | int output; |
||
30 | char *device; |
||
31 | int channels; |
||
32 | int format; |
||
33 | }; |
||
34 | |||
35 | extern int audio_play_samples(struct audio_info_struct *,unsigned char *,int); |
||
36 | extern int audio_open(struct audio_info_struct *); |
||
37 | extern int audio_reset_parameters(struct audio_info_struct *); |
||
38 | extern int audio_rate_best_match(struct audio_info_struct *ai); |
||
39 | extern int audio_set_rate(struct audio_info_struct *); |
||
40 | extern int audio_set_format(struct audio_info_struct *); |
||
41 | extern int audio_get_formats(struct audio_info_struct *); |
||
42 | extern int audio_set_channels(struct audio_info_struct *); |
||
43 | extern int audio_write_sample(struct audio_info_struct *,short *,int); |
||
44 | extern int audio_close(struct audio_info_struct *); |
||
45 | extern void audio_info_struct_init(struct audio_info_struct *); |
||
46 | #ifdef SOLARIS |
||
47 | extern void audio_queueflush(struct audio_info_struct *ai); |
||
48 | #endif |