-
Notifications
You must be signed in to change notification settings - Fork 4
/
Sound.h
executable file
·48 lines (35 loc) · 1.41 KB
/
Sound.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#define SOUND_ERR_LENGTH 256
//error handling
//static int Sound_SetError(char error[SOUND_ERR_LENGTH]); //
char *SoundGetError(void); //
//init and loading files
int SoundInitSound(int channels, int rate, int buffers); //
void SoundCloseSound(void); //
//loading files/samples
int SoundLoadSampleWAV(const char *file); //
int SoundUnloadSample(int sample); //
//music loading
int SoundLoadMusic(const char *file); //
int SoundUnloadMusic(int track); //
//playing sounds
int SoundPlaySample(int sample); //
int SoundLoopSample(int sample, int loops); //
int SoundIsChannelPlaying(int channel); //
void SoundHaltChannel(int channel); //
void SoundSetChannelFinishedFunc(void (*channelfinished)(int channel));
//music playing
int SoundPlayMusic(int track); //
int SoundLoopMusic(int track, int loops); //
void SoundStopMusic(void); //
int SoundIsMusicPLaying(void); //
int SoundIsMusicPaused(void); //
void SoundToggleMusicPaused(void); //
//special effects
int SoundPanChannelUnsignedFloat(int channel, float panning); //float 0.0 - 1.0
int SoundPanChannelFloat(int channel, float panning); //
int SoundPanChannelInt(int channel, signed char panning); //
int SoundSetChannelDistanceFloat(int channel, float distance); //
int SoundSetChannelDistanceInt(int channel, unsigned char distance); //
/*internal functions only
static float ClampFloat(float input, float min, float max);
static int ClampInt(int input, int min, int max);*/