1 | /********************************************************************** <BR>
|
---|
2 | This file is part of Crack dot Com's free source code release of
|
---|
3 | Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
|
---|
4 | information about compiling & licensing issues visit this URL</a>
|
---|
5 | <PRE> If that doesn't help, contact Jonathan Clark at
|
---|
6 | golgotha_source@usa.net (Subject should have "GOLG" in it)
|
---|
7 | ***********************************************************************/
|
---|
8 |
|
---|
9 | /*
|
---|
10 | * Audio 'LIB' defines
|
---|
11 | */
|
---|
12 |
|
---|
13 | enum { AUDIO_OUT_HEADPHONES,AUDIO_OUT_INTERNAL_SPEAKER,AUDIO_OUT_LINE_OUT };
|
---|
14 | enum { DECODE_TEST, DECODE_AUDIO, DECODE_STDOUT, DECODE_BUFFER };
|
---|
15 |
|
---|
16 | #define AUDIO_FORMAT_SIGNED_16 0x1
|
---|
17 | #define AUDIO_FORMAT_UNSIGNED_8 0x2
|
---|
18 | #define AUDIO_FORMAT_SIGNED_8 0x4
|
---|
19 | #define AUDIO_FORMAT_ULAW_8 0x8
|
---|
20 | #define AUDIO_FORMAT_ALAW_8 0x10
|
---|
21 |
|
---|
22 | #if defined(HPUX) || defined(SUNOS) || defined(SOLARIS) || defined(VOXWARE)
|
---|
23 | #define AUDIO_USES_FD
|
---|
24 | #endif
|
---|
25 |
|
---|
26 | struct audio_info_struct
|
---|
27 | {
|
---|
28 | #ifdef AUDIO_USES_FD
|
---|
29 | int fn; /* filenumber */
|
---|
30 | #endif
|
---|
31 | #ifdef SGI
|
---|
32 | ALconfig config;
|
---|
33 | ALport port;
|
---|
34 | #endif
|
---|
35 | long rate;
|
---|
36 | int gain;
|
---|
37 | int output;
|
---|
38 | char *device;
|
---|
39 | int channels;
|
---|
40 | int format;
|
---|
41 | };
|
---|
42 |
|
---|
43 | extern int audio_play_samples(struct audio_info_struct *,unsigned char *,int);
|
---|
44 | extern int audio_open(struct audio_info_struct *);
|
---|
45 | extern int audio_reset_parameters(struct audio_info_struct *);
|
---|
46 | extern int audio_rate_best_match(struct audio_info_struct *ai);
|
---|
47 | extern int audio_set_rate(struct audio_info_struct *);
|
---|
48 | extern int audio_set_format(struct audio_info_struct *);
|
---|
49 | extern int audio_get_formats(struct audio_info_struct *);
|
---|
50 | extern int audio_set_channels(struct audio_info_struct *);
|
---|
51 | extern int audio_write_sample(struct audio_info_struct *,short *,int);
|
---|
52 | extern int audio_close(struct audio_info_struct *);
|
---|
53 | extern void audio_info_struct_init(struct audio_info_struct *);
|
---|
54 | #ifdef SOLARIS
|
---|
55 | extern void audio_queueflush(struct audio_info_struct *ai);
|
---|
56 | #endif
|
---|