Initial Import
[glAntsMech.git] / glants_mech / linux / src / sound.h
blobeb047120dbeebc27e38834c55fd1b23a2f79e93c
1 #ifndef _SOUND_H_
2 #define _SOUND_H_
4 #include <stdlib.h>
5 #include <stdio.h>
7 #define FRAG_SPEC 0x00020007
8 #define SOUND_TURN_ON 1
10 #define NUM_SAMPLES 2
11 #define SAMPLE_RATE 11000
12 #define NUM_CHANNELS 8
14 struct Sample
16 unsigned char *data;
17 int len;
20 typedef struct Sample Sample;
23 int
24 Snd_loadRawSample( const char *file, Sample *sample );
28 // init sound device, etc..
29 // num_snd = the number of samples in the sample array *sa
30 // sa = the sample array
31 // freq = the rate (Hz) to play back the samples
32 // channels = # of channels to mix
33 // sound_device = a char string for the sound device, eg, "/dev/dsp"
34 // returns: 0=success, -1=failure.
36 int Snd_init( int num_snd, const Sample *sa, int freq,
37 int channels, const char *sound_device );
39 int
40 Snd_restore();
42 int
43 Snd_effect( int nr, int channel );
45 void flushSounds(void);
46 void outAudio(int sCouner);
47 void Load_Audio(void);
49 void Do_FireSound(void);
50 void Play_Music(void);
52 #endif