mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Consolidate I_SetDigMusicVolume and I_SetMIDIMusicVolume other targets
(cherry picked from commit 9fb9386f84b3739fe765a78bcb9683eb7e98bc36)
This commit is contained in:
parent
a7ed7b2c90
commit
e58a8f4fe1
5 changed files with 14 additions and 41 deletions
|
@ -92,7 +92,7 @@ boolean I_LoadSong(char *data, size_t len)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void I_SetMIDIMusicVolume(INT32 volume)
|
||||
void I_SetMusicVolume(INT32 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
@ -120,11 +120,6 @@ void I_UnloadSong(void)
|
|||
|
||||
UINT8 digmusic_started = 0;
|
||||
|
||||
void I_SetDigMusicVolume(INT32 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
||||
boolean I_SetSongSpeed(float speed)
|
||||
{
|
||||
(void)speed;
|
||||
|
|
|
@ -140,7 +140,7 @@ void I_SetSfxVolume(INT32 volume)
|
|||
set_volume (Volset(volume),-1);
|
||||
}
|
||||
|
||||
void I_SetMIDIMusicVolume(INT32 volume)
|
||||
void I_SetMusicVolume(INT32 volume)
|
||||
{
|
||||
if (nomidimusic)
|
||||
return;
|
||||
|
@ -503,16 +503,6 @@ boolean I_LoadSong(char *data, size_t len)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void I_SetDigMusicVolume(INT32 volume)
|
||||
{
|
||||
volume = 0;
|
||||
if (nodigimusic)
|
||||
return;
|
||||
|
||||
// Now set volume on output device.
|
||||
// CONS_Printf("Digital music not yet supported under DOS.\n");
|
||||
}
|
||||
|
||||
boolean I_SetSongSpeed(float speed)
|
||||
{
|
||||
(void)speed;
|
||||
|
|
|
@ -70,7 +70,7 @@ void I_InitMusic(void){}
|
|||
|
||||
void I_ShutdownMusic(void){}
|
||||
|
||||
void I_SetMIDIMusicVolume(UINT8 volume)
|
||||
void I_SetMusicVolume(UINT8 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
@ -117,11 +117,6 @@ void I_UnloadSong(void)
|
|||
// DIGMUSIC I/O
|
||||
//
|
||||
|
||||
void I_SetDigMusicVolume(UINT8 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
||||
boolean I_SetSongSpeed(float speed)
|
||||
{
|
||||
(void)speed;
|
||||
|
|
|
@ -1702,7 +1702,7 @@ boolean I_LoadSong(char *data, size_t len)
|
|||
return false;
|
||||
}
|
||||
|
||||
void I_SetMIDIMusicVolume(UINT8 volume)
|
||||
void I_SetMusicVolume(UINT8 volume)
|
||||
{
|
||||
#ifdef HAVE_MIXER
|
||||
if ((nomidimusic && nodigimusic) || !musicStarted)
|
||||
|
@ -1951,11 +1951,6 @@ static void I_StopGME(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void I_SetDigMusicVolume(UINT8 volume)
|
||||
{
|
||||
I_SetMIDIMusicVolume(volume);
|
||||
}
|
||||
|
||||
boolean I_SetSongSpeed(float speed)
|
||||
{
|
||||
|
||||
|
|
|
@ -713,14 +713,6 @@ boolean I_LoadSong(char *data, size_t len)
|
|||
return true;
|
||||
}
|
||||
|
||||
void I_SetDigMusicVolume(UINT8 volume)
|
||||
{
|
||||
// volume is 0 to 31.
|
||||
music_volume = volume;
|
||||
if (I_GetMusicType() != MU_MID && music_stream)
|
||||
FMR_MUSIC(FMOD_Channel_SetVolume(music_channel, volume / 31.0));
|
||||
}
|
||||
|
||||
boolean I_SetSongSpeed(float speed)
|
||||
{
|
||||
FMOD_RESULT e;
|
||||
|
@ -803,12 +795,18 @@ boolean I_SetSongTrack(INT32 track)
|
|||
// Fuck MIDI. ... Okay fine, you can have your silly D_-only mode.
|
||||
//
|
||||
|
||||
void I_SetMIDIMusicVolume(UINT8 volume)
|
||||
void I_SetMusicVolume(UINT8 volume)
|
||||
{
|
||||
if (!music_stream)
|
||||
return;
|
||||
|
||||
// volume is 0 to 31.
|
||||
midi_volume = volume;
|
||||
if (I_GetMusicType() != MU_MID && music_stream)
|
||||
FMR_MUSIC(FMOD_Channel_SetVolume(music_channel, volume / 31.0));
|
||||
if (I_GetMusicType() == MU_MID)
|
||||
music_volume = 31; // windows bug hack
|
||||
else
|
||||
music_volume = volume;
|
||||
|
||||
FMR_MUSIC(FMOD_Channel_SetVolume(music_channel, music_volume / 31.0));
|
||||
}
|
||||
|
||||
boolean I_PlaySong(boolean looping)
|
||||
|
|
Loading…
Reference in a new issue