X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsound.h;h=d38b1ff5ae202cbd5bcb2d0e97540b02456fdde5;hb=157cef71aeb9ae25b7bb90f37dda11bc09329d11;hp=fec9de7a9dc67d582d66b39814c99ca48e7bf386;hpb=84160722392a024dda42bd86ca9bd85b68c49457;p=supertux.git diff --git a/src/sound.h b/src/sound.h index fec9de7a9..d38b1ff5a 100644 --- a/src/sound.h +++ b/src/sound.h @@ -23,12 +23,9 @@ #include "defines.h" /* get YES/NO defines */ -/* used to reserve some channels for panning effects */ -#define SOUND_RESERVED_CHANNELS 2 - /*global variable*/ extern bool use_sound; /* handle sound on/off menu and command-line option */ -extern bool use_music; /* handle music on/off menu and command-line option */ +extern bool use_music; /* handle music on/off menu and command-line */ extern bool audio_device; /* != 0: available and initialized */ /* enum of different internal music types */ @@ -39,11 +36,11 @@ enum Music_Type { HERRING_MUSIC }; - /* panning effects: terrible :-) ! */ enum Sound_Speaker { SOUND_LEFT_SPEAKER = 0, SOUND_RIGHT_SPEAKER = 1, + SOUND_RESERVED_CHANNELS = 2, // 2 channels reserved for left/right speaker SOUND_CENTER_SPEAKER = -1 }; @@ -67,6 +64,7 @@ enum { SND_LIFEUP, SND_STOMP, SND_KICK, + SND_EXPLODE, NUM_SOUNDS }; @@ -77,26 +75,13 @@ extern char* soundfilenames[NUM_SOUNDS]; /* variables for stocking the sound and music */ extern Mix_Chunk* sounds[NUM_SOUNDS]; -extern Mix_Music* level_song; -extern Mix_Music* level_song_fast; -extern Mix_Music* herring_song; /* functions handling the sound and music */ int open_audio(int frequency, Uint16 format, int channels, int chunksize); void close_audio( void ); Mix_Chunk * load_sound(const std::string& file); -void play_sound(Mix_Chunk * snd, enum Sound_Speaker whichSpeaker); -Mix_Music * load_song(const std::string& file); - -int playing_music(void); -int halt_music(void); -int play_music(Mix_Music*music, int loops); -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(); +void play_sound(Mix_Chunk * snd, enum Sound_Speaker whichSpeaker); #endif /*SUPERTUX_SOUND_H*/