4 Super Tux - Audio Functions
7 bill@newbreedsoftware.com
8 http://www.newbreedsoftware.com/supertux/
10 April 22, 2000 - December 27, 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 set_music_position(int pos);
57 void free_music(Mix_Music*music);
58 void free_chunk(Mix_Chunk*chunk);
63 void* sounds[NUM_SOUNDS];
64 void* level_song, *herring_song;
66 // fake sound handlers
67 int open_audio (int frequency, int format, int channels, int chunksize);
69 void* load_sound(void* file);
70 void play_sound(void * snd);
71 void* load_song(void* file);
75 int play_music(void *music, int loops);
76 void free_music(void *music);
78 void free_chunk(void *chunk);
82 #endif /*SUPERTUX_SOUND_H*/