Add a "-noaudio" parm to cover "-nomusic" and "-nosound"

This commit is contained in:
James R 2019-04-18 23:50:29 -07:00
parent f0ee901160
commit a24814c2fc
2 changed files with 22 additions and 10 deletions

View file

@ -1248,10 +1248,21 @@ void D_SRB2Main(void)
{
CONS_Printf("S_InitSfxChannels(): Setting up sound channels.\n");
}
if (M_CheckParm("-noaudio")) // combines -nosound and -nomusic
{
sound_disabled = true;
digital_disabled = true;
midi_disabled = true;
}
else
{
if (M_CheckParm("-nosound"))
sound_disabled = true;
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
midi_disabled = digital_disabled = true;
{
digital_disabled = true;
midi_disabled = true;
}
else
{
if (M_CheckParm("-nomidimusic"))
@ -1259,6 +1270,7 @@ void D_SRB2Main(void)
if (M_CheckParm("-nodigmusic"))
digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
}
}
I_StartupSound();
I_InitMusic();
S_InitSfxChannels(cv_soundvolume.value);

View file

@ -2202,7 +2202,7 @@ static void Command_RestartAudio_f(void)
void GameSounds_OnChange(void)
{
if (M_CheckParm("-nosound"))
if (M_CheckParm("-nosound") || M_CheckParm("-noaudio"))
return;
if (sound_disabled)
@ -2220,7 +2220,7 @@ void GameSounds_OnChange(void)
void GameDigiMusic_OnChange(void)
{
if (M_CheckParm("-nomusic"))
if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
return;
else if (M_CheckParm("-nodigmusic"))
return;
@ -2262,7 +2262,7 @@ void GameDigiMusic_OnChange(void)
void GameMIDIMusic_OnChange(void)
{
if (M_CheckParm("-nomusic"))
if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
return;
else if (M_CheckParm("-nomidimusic"))
return;