X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsound.h;h=20852138ca194d9d34b35dd4fcf9a4bad8e28007;hb=HEAD;hp=26e882b3e177c5345b97c8a3670046463dd83c9e;hpb=2176d1de29652bc9e8db1baa283fdc1c4e99e674;p=rocksndiamonds.git diff --git a/src/libgame/sound.h b/src/libgame/sound.h index 26e882b3..20852138 100644 --- a/src/libgame/sound.h +++ b/src/libgame/sound.h @@ -4,7 +4,7 @@ // (c) 1995-2014 by Artsoft Entertainment // Holger Schemel // info@artsoft.org -// http://www.artsoft.org/ +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // sound.h // ============================================================================ @@ -15,7 +15,7 @@ #include "system.h" -/* values for platform specific sound initialization */ +// values for platform specific sound initialization #define AUDIO_SAMPLE_RATE_22050 22050 #define AUDIO_FRAGMENT_SIZE_512 512 @@ -35,7 +35,7 @@ #define DEFAULT_AUDIO_SAMPLE_RATE AUDIO_SAMPLE_RATE_22050 -#if defined(PLATFORM_WIN32) +#if defined(PLATFORM_WINDOWS) #define DEFAULT_AUDIO_FRAGMENT_SIZE AUDIO_FRAGMENT_SIZE_1024 #else #define DEFAULT_AUDIO_FRAGMENT_SIZE AUDIO_FRAGMENT_SIZE_512 @@ -47,7 +47,7 @@ #define FIRST_SOUND_CHANNEL 1 -/* values for PlaySound(), StopSound() and friends */ +// values for PlaySound(), StopSound() and friends #define SND_CTRL_NONE (0) #define SND_CTRL_MUSIC (1 << 0) #define SND_CTRL_LOOP (1 << 1) @@ -60,7 +60,8 @@ #define SND_CTRL_PLAY_SOUND (SND_CTRL_NONE) #define SND_CTRL_PLAY_LOOP (SND_CTRL_LOOP) -#define SND_CTRL_PLAY_MUSIC (SND_CTRL_LOOP | SND_CTRL_MUSIC) +#define SND_CTRL_PLAY_MUSIC (SND_CTRL_MUSIC) +#define SND_CTRL_PLAY_MUSIC_LOOP (SND_CTRL_MUSIC | SND_CTRL_LOOP) #define SND_CTRL_FADE_SOUND (SND_CTRL_FADE) #define SND_CTRL_FADE_MUSIC (SND_CTRL_FADE | SND_CTRL_MUSIC) @@ -92,20 +93,22 @@ #define SOUND_MIDDLE (SOUND_MAX_LEFT2RIGHT / 2) -/* general sound functions */ +// general sound functions void UnixOpenAudio(void); void UnixCloseAudio(void); -/* mixer functions */ +// mixer functions void Mixer_InitChannels(void); void StartMixer(void); -/* sound client functions */ +// sound client functions void PlayMusic(int); +void PlayMusicLoop(int); void PlaySound(int); void PlaySoundStereo(int, int); void PlaySoundLoop(int); void PlaySoundMusic(int); +void PlaySoundMusicLoop(int); void PlaySoundExt(int, int, int, int); void FadeMusic(void); void FadeSound(int); @@ -117,20 +120,24 @@ void StopSounds(void); void StopSoundExt(int, int); void ExpireSoundLoops(boolean); -int getSoundListSize(); -int getMusicListSize(); +int getSoundListSize(void); +int getMusicListSize(void); +int getMusicListSize_NoConf(void); struct FileInfo *getSoundListEntry(int); struct FileInfo *getMusicListEntry(int); -int getSoundListPropertyMappingSize(); -int getMusicListPropertyMappingSize(); -struct PropertyMapping *getSoundListPropertyMapping(); -struct PropertyMapping *getMusicListPropertyMapping(); +char *getSoundInfoEntryFilename(int); +char *getMusicInfoEntryFilename(int); +char *getCurrentlyPlayingMusicFilename(void); +int getSoundListPropertyMappingSize(void); +int getMusicListPropertyMappingSize(void); +struct PropertyMapping *getSoundListPropertyMapping(void); +struct PropertyMapping *getMusicListPropertyMapping(void); void InitSoundList(struct ConfigInfo *, int, struct ConfigTypeInfo *, char **, char **, char **, char **, char **); void InitMusicList(struct ConfigInfo *, int, struct ConfigTypeInfo *, char **, char **, char **, char **, char **); -void InitReloadCustomSounds(char *); -void InitReloadCustomMusic(char *); +void InitReloadCustomSounds(void); +void InitReloadCustomMusic(void); void FreeAllSounds(void); void FreeAllMusic(void);