4 Super Tux - Audio Functions
7 bill@newbreedsoftware.com
8 http://www.newbreedsoftware.com/supertux/
10 April 22, 2000 - December 28, 2003
13 Duong-Khang NGUYEN <neoneurone@users.sf.net>
16 #ifndef SUPERTUX_SOUND_H
17 #define SUPERTUX_SOUND_H
19 #include "defines.h" /* get YES/NO defines */
21 /*all the sounds we have*/
27 int audio_device; /* != 0: available and initialized */
29 /* enum of different internal music types */
40 #include <SDL_mixer.h>
42 /* variables for stocking the sound and music */
43 Mix_Chunk* sounds[NUM_SOUNDS];
44 Mix_Music* level_song, *herring_song;
46 /* functions handling the sound and music */
47 int open_audio(int frequency, Uint16 format, int channels, int chunksize);
49 Mix_Chunk * load_sound(char * file);
50 void play_sound(Mix_Chunk * snd);
51 Mix_Music * load_song(char * file);
53 int playing_music(void);
55 int play_music(Mix_Music*music, int loops);
56 void free_music(Mix_Music*music);
57 void free_chunk(Mix_Chunk*chunk);
62 void* sounds[NUM_SOUNDS];
63 void* level_song, *herring_song;
65 // fake sound handlers
66 int open_audio (int frequency, int format, int channels, int chunksize);
68 void* load_sound(void* file);
69 void play_sound(void * snd);
70 void* load_song(void* file);
74 int play_music(void *music, int loops);
75 void free_music(void *music);
77 void free_chunk(void *chunk);
81 #endif /*SUPERTUX_SOUND_H*/