mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 05:30:48 +00:00
Nix'd midimusicvolume
This commit is contained in:
parent
87e37e21df
commit
b5c3095820
7 changed files with 7 additions and 53 deletions
|
@ -1212,7 +1212,7 @@ void D_SRB2Main(void)
|
|||
}
|
||||
I_StartupSound();
|
||||
I_InitMusic();
|
||||
S_Init(cv_soundvolume.value, cv_digmusicvolume.value, cv_midimusicvolume.value);
|
||||
S_Init(cv_soundvolume.value, cv_digmusicvolume.value);
|
||||
|
||||
CONS_Printf("ST_Init(): Init status bar.\n");
|
||||
ST_Init();
|
||||
|
|
|
@ -790,7 +790,6 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_soundvolume);
|
||||
CV_RegisterVar(&cv_closedcaptioning);
|
||||
CV_RegisterVar(&cv_digmusicvolume);
|
||||
CV_RegisterVar(&cv_midimusicvolume);
|
||||
CV_RegisterVar(&cv_numChannels);
|
||||
|
||||
// i_cdmus.c
|
||||
|
@ -4058,7 +4057,6 @@ static void Command_RestartAudio_f(void)
|
|||
|
||||
I_SetSfxVolume(cv_soundvolume.value);
|
||||
I_SetDigMusicVolume(cv_digmusicvolume.value);
|
||||
I_SetMIDIMusicVolume(cv_midimusicvolume.value);
|
||||
if (Playing()) // Gotta make sure the player is in a level
|
||||
P_RestoreMusic(&players[consoleplayer]);
|
||||
|
||||
|
|
|
@ -144,14 +144,6 @@ void I_InitMIDIMusic(void);
|
|||
*/
|
||||
void I_ShutdownMIDIMusic(void);
|
||||
|
||||
/** \brief The I_SetMIDIMusicVolume function
|
||||
|
||||
\param volume volume to set at
|
||||
|
||||
\return void
|
||||
*/
|
||||
void I_SetMIDIMusicVolume(UINT8 volume);
|
||||
|
||||
/** \brief Registers a song handle to song data.
|
||||
|
||||
\param data pointer to song data
|
||||
|
|
|
@ -1314,9 +1314,6 @@ static menuitem_t OP_SoundOptionsMenu[] =
|
|||
{IT_STRING | IT_KEYHANDLER, NULL, "Digital Music", M_ToggleDigital, 40},
|
||||
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Digital Music Volume", &cv_digmusicvolume, 50},
|
||||
|
||||
{IT_STRING | IT_KEYHANDLER, NULL, "MIDI Music", M_ToggleMIDI, 70},
|
||||
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "MIDI Music Volume", &cv_midimusicvolume, 80},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Closed Captioning", &cv_closedcaptioning, 100},
|
||||
};
|
||||
|
||||
|
@ -9421,7 +9418,7 @@ static void M_ToggleSFX(INT32 choice)
|
|||
nosound = false;
|
||||
I_StartupSound();
|
||||
if (nosound) return;
|
||||
S_Init(cv_soundvolume.value, cv_digmusicvolume.value, cv_midimusicvolume.value);
|
||||
S_Init(cv_soundvolume.value, cv_digmusicvolume.value);
|
||||
S_StartSound(NULL, sfx_strpst);
|
||||
OP_SoundOptionsMenu[6].status = IT_STRING | IT_CVAR;
|
||||
//M_StartMessage(M_GetText("SFX Enabled\n"), NULL, MM_NOTHING);
|
||||
|
@ -9474,7 +9471,7 @@ static void M_ToggleDigital(INT32 choice)
|
|||
nodigimusic = false;
|
||||
I_InitDigMusic();
|
||||
if (nodigimusic) return;
|
||||
S_Init(cv_soundvolume.value, cv_digmusicvolume.value, cv_midimusicvolume.value);
|
||||
S_Init(cv_soundvolume.value, cv_digmusicvolume.value);
|
||||
S_StopMusic();
|
||||
if (Playing())
|
||||
P_RestoreMusic(&players[consoleplayer]);
|
||||
|
@ -9531,7 +9528,7 @@ static void M_ToggleMIDI(INT32 choice)
|
|||
nomidimusic = false;
|
||||
I_InitMIDIMusic();
|
||||
if (nomidimusic) return;
|
||||
S_Init(cv_soundvolume.value, cv_digmusicvolume.value, cv_midimusicvolume.value);
|
||||
S_Init(cv_soundvolume.value, cv_digmusicvolume.value);
|
||||
if (Playing())
|
||||
P_RestoreMusic(&players[consoleplayer]);
|
||||
else
|
||||
|
|
|
@ -77,7 +77,6 @@ static consvar_t precachesound = {"precachesound", "Off", CV_SAVE, CV_OnOff, NUL
|
|||
// actual general (maximum) sound & music volume, saved into the config
|
||||
consvar_t cv_soundvolume = {"soundvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_digmusicvolume = {"digmusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_midimusicvolume = {"midimusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static void Captioning_OnChange(void)
|
||||
{
|
||||
|
@ -788,7 +787,6 @@ void S_StopSound(void *origin)
|
|||
//
|
||||
static INT32 actualsfxvolume; // check for change through console
|
||||
static INT32 actualdigmusicvolume;
|
||||
static INT32 actualmidimusicvolume;
|
||||
|
||||
void S_UpdateSounds(void)
|
||||
{
|
||||
|
@ -810,8 +808,6 @@ void S_UpdateSounds(void)
|
|||
S_SetSfxVolume (cv_soundvolume.value);
|
||||
if (actualdigmusicvolume != cv_digmusicvolume.value)
|
||||
S_SetDigMusicVolume (cv_digmusicvolume.value);
|
||||
if (actualmidimusicvolume != cv_midimusicvolume.value)
|
||||
S_SetMIDIMusicVolume (cv_midimusicvolume.value);
|
||||
|
||||
// We're done now, if we're not in a level.
|
||||
if (gamestate != GS_LEVEL)
|
||||
|
@ -1447,20 +1443,6 @@ void S_SetDigMusicVolume(INT32 volume)
|
|||
I_SetDigMusicVolume(volume&31);
|
||||
}
|
||||
|
||||
void S_SetMIDIMusicVolume(INT32 volume)
|
||||
{
|
||||
if (volume < 0 || volume > 31)
|
||||
CONS_Alert(CONS_WARNING, "musicvolume should be between 0-31\n");
|
||||
|
||||
CV_SetValue(&cv_midimusicvolume, volume&0x1f);
|
||||
actualmidimusicvolume = cv_midimusicvolume.value; //check for change of var
|
||||
|
||||
#ifdef DJGPPDOS
|
||||
I_SetMIDIMusicVolume(31); // Trick for buggy dos drivers. Win32 doesn't need this.
|
||||
#endif
|
||||
I_SetMIDIMusicVolume(volume&0x1f);
|
||||
}
|
||||
|
||||
/// ------------------------
|
||||
/// Init & Others
|
||||
/// ------------------------
|
||||
|
@ -1470,7 +1452,7 @@ void S_SetMIDIMusicVolume(INT32 volume)
|
|||
// Sets channels, SFX and music volume,
|
||||
// allocates channel buffer, sets S_sfx lookup.
|
||||
//
|
||||
void S_Init(INT32 sfxVolume, INT32 digMusicVolume, INT32 midiMusicVolume)
|
||||
void S_Init(INT32 sfxVolume, INT32 digMusicVolume)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
|
@ -1479,7 +1461,6 @@ void S_Init(INT32 sfxVolume, INT32 digMusicVolume, INT32 midiMusicVolume)
|
|||
|
||||
S_SetSfxVolume(sfxVolume);
|
||||
S_SetDigMusicVolume(digMusicVolume);
|
||||
S_SetMIDIMusicVolume(midiMusicVolume);
|
||||
|
||||
SetChannelsNum();
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#define PICKUP_SOUND 0x8000
|
||||
|
||||
extern consvar_t stereoreverse;
|
||||
extern consvar_t cv_soundvolume, cv_closedcaptioning, cv_digmusicvolume, cv_midimusicvolume;
|
||||
extern consvar_t cv_soundvolume, cv_closedcaptioning, cv_digmusicvolume;
|
||||
extern consvar_t cv_numChannels;
|
||||
|
||||
#ifdef SNDSERV
|
||||
|
@ -99,7 +99,7 @@ void S_RegisterSoundStuff(void);
|
|||
// Initializes sound stuff, including volume
|
||||
// Sets channels, SFX and music volume, allocates channel buffer, sets S_sfx lookup.
|
||||
//
|
||||
void S_Init(INT32 sfxVolume, INT32 digMusicVolume, INT32 midiMusicVolume);
|
||||
void S_Init(INT32 sfxVolume, INT32 digMusicVolume);
|
||||
|
||||
//
|
||||
// Per level startup code.
|
||||
|
@ -150,7 +150,6 @@ void S_UpdateSounds(void);
|
|||
FUNCMATH fixed_t S_CalculateSoundDistance(fixed_t px1, fixed_t py1, fixed_t pz1, fixed_t px2, fixed_t py2, fixed_t pz2);
|
||||
|
||||
void S_SetDigMusicVolume(INT32 volume);
|
||||
void S_SetMIDIMusicVolume(INT32 volume);
|
||||
void S_SetSfxVolume(INT32 volume);
|
||||
|
||||
INT32 S_OriginPlaying(void *origin);
|
||||
|
|
|
@ -783,19 +783,6 @@ void I_ShutdownMIDIMusic(void)
|
|||
music = NULL;
|
||||
}
|
||||
|
||||
void I_SetMIDIMusicVolume(UINT8 volume)
|
||||
{
|
||||
// HACK: Until we stop using native MIDI,
|
||||
// disable volume changes
|
||||
(void)volume;
|
||||
midi_volume = 31;
|
||||
//midi_volume = volume;
|
||||
|
||||
if (!midimode || !music)
|
||||
return;
|
||||
Mix_VolumeMusic((UINT32)midi_volume*128/31);
|
||||
}
|
||||
|
||||
INT32 I_RegisterSong(void *data, size_t len)
|
||||
{
|
||||
music = Mix_LoadMUS_RW(SDL_RWFromMem(data, len), SDL_FALSE);
|
||||
|
|
Loading…
Reference in a new issue