4 Super Tux - Audio Functions
7 bill@newbreedsoftware.com
8 http://www.newbreedsoftware.com/supertux/
10 April 22, 2000 - July 15, 2002
13 #ifndef SUPERTUX_SOUND_H
14 #define SUPERTUX_SOUND_H
16 #include "defines.h" /* get YES/NO defines */
18 /*all the sounds we have*/
23 int audio_device; /* != 0: available and initialized */
25 /* enum of different internal music types */
36 #include <SDL_mixer.h>
38 /* variables for stocking the sound and music */
39 Mix_Chunk* sounds[NUM_SOUNDS];
40 Mix_Music* level_song, *herring_song;
42 /* functions handling the sound and music */
43 int open_audio(int frequency, Uint16 format, int channels, int chunksize);
45 Mix_Chunk * load_sound(char * file);
46 void play_sound(Mix_Chunk * snd);
47 Mix_Music * load_song(char * file);
49 int playing_music(void);
51 int play_music(Mix_Music*music, int loops);
52 void free_music(Mix_Music*music);
53 void free_chunk(Mix_Chunk*chunk);
58 void* sounds[NUM_SOUNDS];
59 void* level_song, *herring_song;
61 // fake sound handlers
62 int open_audio (int frequency, int format, int channels, int chunksize);
64 void* load_sound(void* file);
65 void play_sound(void * snd);
66 void* load_song(void* file);
70 int play_music(void *music, int loops);
71 void free_music(void *music);
73 void free_chunk(void *chunk);
77 #endif /*SUPERTUX_SOUND_H*/