mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 03:12:38 +00:00
Revert "Nix'd midimusicvolume other targets"
This reverts commit 58fbb4636f
.
# Conflicts:
# src/android/i_sound.c
# src/dummy/i_sound.c
# src/win32/win_snd.c
This commit is contained in:
parent
75cbfab8c6
commit
3ec1a122e0
6 changed files with 45 additions and 12 deletions
|
@ -87,6 +87,11 @@ boolean I_LoadSong(void *data, size_t len)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void I_SetMIDIMusicVolume(INT32 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
||||
boolean I_PlaySong(void)
|
||||
{
|
||||
(void)handle;
|
||||
|
|
|
@ -140,6 +140,15 @@ void I_SetSfxVolume(INT32 volume)
|
|||
set_volume (Volset(volume),-1);
|
||||
}
|
||||
|
||||
void I_SetMIDIMusicVolume(INT32 volume)
|
||||
{
|
||||
if (nomidimusic)
|
||||
return;
|
||||
|
||||
// Now set volume on output device.
|
||||
set_volume (-1, Volset(volume));
|
||||
}
|
||||
|
||||
//
|
||||
// Starting a sound means adding it
|
||||
// to the current list of active sounds
|
||||
|
@ -494,7 +503,7 @@ void I_SetDigMusicVolume(INT32 volume)
|
|||
return;
|
||||
|
||||
// Now set volume on output device.
|
||||
set_volume (-1, Volset(volume));
|
||||
// CONS_Printf("Digital music not yet supported under DOS.\n");
|
||||
}
|
||||
|
||||
boolean I_SetSongSpeed(float speed)
|
||||
|
|
|
@ -65,6 +65,11 @@ void I_InitMusic(void){}
|
|||
|
||||
void I_ShutdownMusic(void){}
|
||||
|
||||
void I_SetMIDIMusicVolume(UINT8 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
||||
void I_PauseSong(INT32 handle)
|
||||
{
|
||||
(void)handle;
|
||||
|
|
|
@ -1679,6 +1679,21 @@ boolean I_LoadSong(void *data, size_t len)
|
|||
return false;
|
||||
}
|
||||
|
||||
void I_SetMIDIMusicVolume(UINT8 volume)
|
||||
{
|
||||
#ifdef HAVE_MIXER
|
||||
if ((nomidimusic && nodigimusic) || !musicStarted)
|
||||
return;
|
||||
|
||||
if (Msc_Mutex) SDL_LockMutex(Msc_Mutex);
|
||||
musicvol = volume * 2;
|
||||
if (Msc_Mutex) SDL_UnlockMutex(Msc_Mutex);
|
||||
Mix_VolumeMusic(musicvol);
|
||||
#else
|
||||
(void)volume;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
static void I_CleanupGME(void *userdata)
|
||||
{
|
||||
|
@ -1915,17 +1930,7 @@ static void I_StopGME(void)
|
|||
|
||||
void I_SetDigMusicVolume(UINT8 volume)
|
||||
{
|
||||
#ifdef HAVE_MIXER
|
||||
if ((nomidimusic && nodigimusic) || !musicStarted)
|
||||
return;
|
||||
|
||||
if (Msc_Mutex) SDL_LockMutex(Msc_Mutex);
|
||||
musicvol = volume * 2;
|
||||
if (Msc_Mutex) SDL_UnlockMutex(Msc_Mutex);
|
||||
Mix_VolumeMusic(musicvol);
|
||||
#else
|
||||
(void)volume;
|
||||
#endif
|
||||
I_SetMIDIMusicVolume(volume);
|
||||
}
|
||||
|
||||
boolean I_SetSongSpeed(float speed)
|
||||
|
|
|
@ -470,6 +470,7 @@ void I_PlayCD(UINT8 nTrack, UINT8 bLooping)
|
|||
|
||||
//faB: stop MIDI music, MIDI music will restart if volume is upped later
|
||||
cv_digmusicvolume.value = 0;
|
||||
cv_midimusicvolume.value = 0;
|
||||
I_StopSong (0);
|
||||
|
||||
//faB: I don't use the notify message, I'm trying to minimize the delay
|
||||
|
|
|
@ -775,6 +775,14 @@ boolean I_SetSongTrack(INT32 track)
|
|||
// Fuck MIDI. ... Okay fine, you can have your silly D_-only mode.
|
||||
//
|
||||
|
||||
void I_SetMIDIMusicVolume(UINT8 volume)
|
||||
{
|
||||
// volume is 0 to 31.
|
||||
midi_volume = volume;
|
||||
if (midimode && music_stream)
|
||||
FMR_MUSIC(FMOD_Channel_SetVolume(music_channel, volume / 31.0));
|
||||
}
|
||||
|
||||
boolean I_PlaySong(void)
|
||||
{
|
||||
#ifdef HAVE_LIBGME
|
||||
|
|
Loading…
Reference in a new issue