source: golgotha/src/i4/loaders/mp3/audio.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.9 KB
Line 
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
13enum { AUDIO_OUT_HEADPHONES,AUDIO_OUT_INTERNAL_SPEAKER,AUDIO_OUT_LINE_OUT };
14enum { 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
26struct 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
43extern int audio_play_samples(struct audio_info_struct *,unsigned char *,int);
44extern int audio_open(struct audio_info_struct *);
45extern int audio_reset_parameters(struct audio_info_struct *);
46extern int audio_rate_best_match(struct audio_info_struct *ai);
47extern int audio_set_rate(struct audio_info_struct *);
48extern int audio_set_format(struct audio_info_struct *);
49extern int audio_get_formats(struct audio_info_struct *);
50extern int audio_set_channels(struct audio_info_struct *);
51extern int audio_write_sample(struct audio_info_struct *,short *,int);
52extern int audio_close(struct audio_info_struct *);
53extern void audio_info_struct_init(struct audio_info_struct *);
54#ifdef SOLARIS
55extern void audio_queueflush(struct audio_info_struct *ai);
56#endif
Note: See TracBrowser for help on using the repository browser.