mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
Merge branch 'music-cleanup' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into music-cleanup
This commit is contained in:
commit
df455fc638
8 changed files with 38 additions and 38 deletions
|
@ -70,17 +70,17 @@ void I_ShutdownMusic(void){}
|
|||
// MUSIC PROPERTIES
|
||||
/// ------------------------
|
||||
|
||||
musictype_t I_MusicType(void)
|
||||
musictype_t I_SongType(void)
|
||||
{
|
||||
return MU_NONE;
|
||||
}
|
||||
|
||||
boolean I_MusicPlaying(void)
|
||||
boolean I_SongPlaying(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean I_MusicPaused(void)
|
||||
boolean I_SongPaused(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -408,7 +408,7 @@ void I_ShutdownMusic(void)
|
|||
// MUSIC PROPERTIES
|
||||
/// ------------------------
|
||||
|
||||
musictype_t I_MusicType(void)
|
||||
musictype_t I_SongType(void)
|
||||
{
|
||||
if (currsong)
|
||||
return MU_MID;
|
||||
|
@ -416,12 +416,12 @@ musictype_t I_MusicType(void)
|
|||
return MU_NONE;
|
||||
}
|
||||
|
||||
boolean I_MusicPlaying()
|
||||
boolean I_SongPlaying()
|
||||
{
|
||||
return (boolean)currsong;
|
||||
}
|
||||
|
||||
boolean I_MusicPaused()
|
||||
boolean I_SongPaused()
|
||||
{
|
||||
return songpaused;
|
||||
}
|
||||
|
|
|
@ -69,17 +69,17 @@ void I_ShutdownMusic(void){}
|
|||
// MUSIC PROPERTIES
|
||||
/// ------------------------
|
||||
|
||||
musictype_t I_MusicType(void)
|
||||
musictype_t I_SongType(void)
|
||||
{
|
||||
return MU_NONE;
|
||||
}
|
||||
|
||||
boolean I_MusicPlaying(void)
|
||||
boolean I_SongPlaying(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean I_MusicPaused(void)
|
||||
boolean I_SongPaused(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -136,9 +136,9 @@ void I_ShutdownMusic(void);
|
|||
// MUSIC PROPERTIES
|
||||
/// ------------------------
|
||||
|
||||
musictype_t I_MusicType(void);
|
||||
boolean I_MusicPlaying(void);
|
||||
boolean I_MusicPaused(void);
|
||||
musictype_t I_SongType(void);
|
||||
boolean I_SongPlaying(void);
|
||||
boolean I_SongPaused(void);
|
||||
|
||||
/// ------------------------
|
||||
// MUSIC EFFECTS
|
||||
|
|
|
@ -1371,22 +1371,22 @@ boolean S_MusicDisabled(void)
|
|||
|
||||
boolean S_MusicPlaying(void)
|
||||
{
|
||||
return I_MusicPlaying();
|
||||
return I_SongPlaying();
|
||||
}
|
||||
|
||||
boolean S_MusicPaused(void)
|
||||
{
|
||||
return I_MusicPaused();
|
||||
return I_SongPaused();
|
||||
}
|
||||
|
||||
musictype_t S_MusicType(void)
|
||||
{
|
||||
return I_MusicType();
|
||||
return I_SongType();
|
||||
}
|
||||
|
||||
boolean S_MusicInfo(char *mname, UINT16 *mflags, boolean *looping)
|
||||
{
|
||||
if (!I_MusicPlaying())
|
||||
if (!I_SongPlaying())
|
||||
return false;
|
||||
|
||||
strncpy(mname, music_name, 7);
|
||||
|
@ -1515,10 +1515,10 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping)
|
|||
|
||||
void S_StopMusic(void)
|
||||
{
|
||||
if (!I_MusicPlaying())
|
||||
if (!I_SongPlaying())
|
||||
return;
|
||||
|
||||
if (I_MusicPaused())
|
||||
if (I_SongPaused())
|
||||
I_ResumeSong();
|
||||
|
||||
S_SpeedMusic(1.0f);
|
||||
|
@ -1543,7 +1543,7 @@ void S_StopMusic(void)
|
|||
//
|
||||
void S_PauseAudio(void)
|
||||
{
|
||||
if (I_MusicPlaying() && !I_MusicPaused())
|
||||
if (I_SongPlaying() && !I_SongPaused())
|
||||
I_PauseSong();
|
||||
|
||||
// pause cd music
|
||||
|
@ -1556,7 +1556,7 @@ void S_PauseAudio(void)
|
|||
|
||||
void S_ResumeAudio(void)
|
||||
{
|
||||
if (I_MusicPlaying() && I_MusicPaused())
|
||||
if (I_SongPlaying() && I_SongPaused())
|
||||
I_ResumeSong();
|
||||
|
||||
// resume cd music
|
||||
|
@ -1584,7 +1584,7 @@ void S_SetMusicVolume(INT32 digvolume, INT32 seqvolume)
|
|||
digvolume = seqvolume = 31;
|
||||
#endif
|
||||
|
||||
switch(I_MusicType())
|
||||
switch(I_SongType())
|
||||
{
|
||||
case MU_MID:
|
||||
case MU_MOD:
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
UINT8 sound_started = false;
|
||||
|
||||
static Mix_Music *music;
|
||||
static UINT8 music_volume, midi_volume, sfx_volume;
|
||||
static UINT8 music_volume, sfx_volume;
|
||||
static float loop_point;
|
||||
static boolean songpaused;
|
||||
|
||||
|
@ -91,7 +91,7 @@ void I_StartupSound(void)
|
|||
}
|
||||
|
||||
music = NULL;
|
||||
music_volume = midi_volume = sfx_volume = 0;
|
||||
music_volume = sfx_volume = 0;
|
||||
|
||||
#if SDL_MIXER_VERSION_ATLEAST(1,2,11)
|
||||
Mix_Init(MIX_INIT_FLAC|MIX_INIT_MOD|MIX_INIT_MP3|MIX_INIT_OGG);
|
||||
|
@ -503,7 +503,7 @@ void I_ShutdownMusic(void)
|
|||
/// Music Properties
|
||||
/// ------------------------
|
||||
|
||||
musictype_t I_MusicType(void)
|
||||
musictype_t I_SongType(void)
|
||||
{
|
||||
#ifdef HAVE_LIBGME
|
||||
if (gme)
|
||||
|
@ -522,12 +522,12 @@ musictype_t I_MusicType(void)
|
|||
return (musictype_t)Mix_GetMusicType(music);
|
||||
}
|
||||
|
||||
boolean I_MusicPlaying(void)
|
||||
boolean I_SongPlaying(void)
|
||||
{
|
||||
return (boolean)music;
|
||||
}
|
||||
|
||||
boolean I_MusicPaused(void)
|
||||
boolean I_SongPaused(void)
|
||||
{
|
||||
return songpaused;
|
||||
}
|
||||
|
@ -772,7 +772,7 @@ void I_SetMusicVolume(UINT8 volume)
|
|||
return;
|
||||
|
||||
#ifdef _WIN32
|
||||
if (I_MusicType() == MU_MID)
|
||||
if (I_SongType() == MU_MID)
|
||||
// HACK: Until we stop using native MIDI,
|
||||
// disable volume changes
|
||||
music_volume = 31;
|
||||
|
|
|
@ -1313,7 +1313,7 @@ void I_StartupSound(void)
|
|||
// MUSIC API.
|
||||
//
|
||||
|
||||
musictype_t I_MusicType(void)
|
||||
musictype_t I_SongType(void)
|
||||
{
|
||||
#ifdef HAVE_MIXER
|
||||
#ifdef HAVE_LIBGME
|
||||
|
@ -1336,12 +1336,12 @@ musictype_t I_MusicType(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
boolean I_MusicPlaying(void)
|
||||
boolean I_SongPlaying(void)
|
||||
{
|
||||
return music_started;
|
||||
}
|
||||
|
||||
boolean I_MusicPaused(void)
|
||||
boolean I_SongPaused(void)
|
||||
{
|
||||
return Mix_PausedMusic();
|
||||
}
|
||||
|
@ -1591,17 +1591,17 @@ void I_ShutdownMusic(void)
|
|||
// MUSIC PROPERTIES
|
||||
/// ------------------------
|
||||
|
||||
musictype_t I_MusicType(void)
|
||||
musictype_t I_SongType(void)
|
||||
{
|
||||
return MU_NONE;
|
||||
}
|
||||
|
||||
boolean I_MusicPlaying(void)
|
||||
boolean I_SongPlaying(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean I_MusicPaused(void)
|
||||
boolean I_SongPaused(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -456,7 +456,7 @@ void I_ShutdownMusic(void)
|
|||
// MUSIC PROPERTIES
|
||||
/// ------------------------
|
||||
|
||||
musictype_t I_MusicType(void)
|
||||
musictype_t I_SongType(void)
|
||||
{
|
||||
#ifdef HAVE_LIBGME
|
||||
if (gme)
|
||||
|
@ -491,12 +491,12 @@ musictype_t I_MusicType(void)
|
|||
return MU_NONE;
|
||||
}
|
||||
|
||||
boolean I_MusicPlaying(void)
|
||||
boolean I_SongPlaying(void)
|
||||
{
|
||||
return (boolean)music_stream;
|
||||
}
|
||||
|
||||
boolean I_MusicPaused(void)
|
||||
boolean I_SongPaused(void)
|
||||
{
|
||||
boolean fmpaused = false;
|
||||
if (music_stream)
|
||||
|
@ -780,7 +780,7 @@ boolean I_PlaySong(boolean looping)
|
|||
#endif
|
||||
|
||||
FMR(FMOD_System_PlaySound(fsys, FMOD_CHANNEL_FREE, music_stream, false, &music_channel));
|
||||
if (I_MusicType() != MU_MID)
|
||||
if (I_SongType() != MU_MID)
|
||||
FMR(FMOD_Channel_SetVolume(music_channel, midi_volume / 31.0));
|
||||
else
|
||||
FMR(FMOD_Channel_SetVolume(music_channel, music_volume / 31.0));
|
||||
|
@ -822,7 +822,7 @@ void I_SetMusicVolume(UINT8 volume)
|
|||
return;
|
||||
|
||||
// volume is 0 to 31.
|
||||
if (I_MusicType() == MU_MID)
|
||||
if (I_SongType() == MU_MID)
|
||||
music_volume = 31; // windows bug hack
|
||||
else
|
||||
music_volume = volume;
|
||||
|
|
Loading…
Reference in a new issue