Implemented --help and --disable-sound (patch by Duong-Khang NGUYEN <neoneurone@users...
[supertux.git] / src / sound.h
1 /*
2   sound.h
3   
4   Super Tux - Audio Functions
5   
6   by Bill Kendrick
7   bill@newbreedsoftware.com
8   http://www.newbreedsoftware.com/supertux/
9   
10   April 22, 2000 - July 15, 2002
11 */
12
13 #ifndef SUPERTUX_SOUND_H
14 #define SUPERTUX_SOUND_H
15
16 #define NUM_SOUNDS 16  // all the sounds we have
17
18 #ifndef NOSOUND
19
20 #include <SDL_mixer.h>
21
22 // variables for stocking the sound and music
23 Mix_Chunk* sounds[NUM_SOUNDS];
24 Mix_Music* song;
25
26 // functions handling the sound and music
27 Mix_Chunk * load_sound(char * file);
28 void playsound(Mix_Chunk * snd);
29 Mix_Music * load_song(char * file);
30
31 int playing_music(void);
32 int halt_music(void);
33 int play_music(Mix_Music*music, int loops);
34 void free_music(Mix_Music*music);
35 void free_chunk(Mix_Chunk*chunk);
36
37 #else
38
39 //fake variables
40 void* sounds[NUM_SOUNDS];
41 void* song;
42
43 // fake sound handlers
44 void* load_sound(void* file);
45 void playsound(void * snd);
46 void* load_song(void* file);
47 int Mix_PlayingMusic();
48 void Mix_HaltMusic();
49 int Mix_PlayMusic();
50 void Mix_FreeMusic();
51 void Mix_FreeChunk();
52 int Mix_OpenAudio(int a, int b, int c, int d);
53
54 int playing_music();
55 void halt_music();
56 int play_music(int *music, int loops);
57 void free_music(int *music);;
58 void free_chunk(int *chunk);
59
60 #endif
61
62 #endif /*SUPERTUX_SOUND_H*/