bill@newbreedsoftware.com
http://www.newbreedsoftware.com/supertux/
- April 22, 2000 - December 28, 2003
+ April 22, 2000 - March 15, 2004
Current maintainer:
Duong-Khang NGUYEN <neoneurone@users.sf.net>
#define SOUND_RESERVED_CHANNELS 2
/*global variable*/
-int use_sound; /* handle sound on/off menu and command-line option */
-int use_music; /* handle music on/off menu and command-line option */
-int audio_device; /* != 0: available and initialized */
+extern int use_sound; /* handle sound on/off menu and command-line option */
+extern int use_music; /* handle music on/off menu and command-line option */
+extern int audio_device; /* != 0: available and initialized */
/* enum of different internal music types */
enum Music_Type {
LEVEL_MUSIC,
HURRYUP_MUSIC,
HERRING_MUSIC
-} current_music;
+};
+
/* panning effects: terrible :-) ! */
enum Sound_Speaker {
NUM_SOUNDS
};
+extern char* soundfilenames[NUM_SOUNDS];
+
#ifndef NOSOUND
#include <SDL_mixer.h>
/* variables for stocking the sound and music */
-Mix_Chunk * sounds[NUM_SOUNDS];
-Mix_Music * level_song, * level_song_fast, * herring_song;
+extern Mix_Chunk * sounds[NUM_SOUNDS];
+extern Mix_Music * level_song, * level_song_fast, * herring_song;
/* functions handling the sound and music */
int open_audio(int frequency, Uint16 format, int channels, int chunksize);
void free_music(Mix_Music*music);
void free_chunk(Mix_Chunk*chunk);
+int get_current_music();
+void set_current_music(int music);
+void play_current_music();
+
#else
/* fake variables */
-void* sounds[NUM_SOUNDS];
-void* level_song, *herring_song;
+extern void* sounds[NUM_SOUNDS];
+extern void * level_song, * level_song_fast, * herring_song;
/* fake sound handlers */
int open_audio (int frequency, int format, int channels, int chunksize);
void free_music(void *music);
void free_chunk(void *chunk);
+int get_current_music();
+void set_current_music(int music);
+void play_current_music(void);
+
#endif
#endif /*SUPERTUX_SOUND_H*/