set defaults for game_pause and end_pos.
[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  /*all the sounds we have*/
17 #define NUM_SOUNDS 16
18
19 #ifndef NOSOUND
20
21 #include <SDL_mixer.h>
22
23 // variables for stocking the sound and music
24 Mix_Chunk* sounds[NUM_SOUNDS];
25 Mix_Music* song;
26
27 // functions handling the sound and music
28 int open_audio(int frequency, Uint16 format, int channels, int chunksize);
29
30 Mix_Chunk * load_sound(char * file);
31 void play_sound(Mix_Chunk * snd);
32 Mix_Music * load_song(char * file);
33
34 int playing_music(void);
35 int halt_music(void);
36 int play_music(Mix_Music*music, int loops);
37 void free_music(Mix_Music*music);
38 void free_chunk(Mix_Chunk*chunk);
39
40 #else
41
42 //fake variables
43 void* sounds[NUM_SOUNDS];
44 void* song;
45
46 // fake sound handlers
47 int open_audio (int frequency, int format, int channels, int chunksize);
48
49 void* load_sound(void* file);
50 void play_sound(void * snd);
51 void* load_song(void* file);
52
53 int playing_music();
54 void halt_music();
55 int play_music(int *music, int loops);
56 void free_music(int *music);;
57 void free_chunk(int *chunk);
58
59 #endif
60
61 #endif /*SUPERTUX_SOUND_H*/