Do not start sound system when disabled

This commit is contained in:
james 2019-02-06 17:24:13 -08:00
parent 1c3fe3ce83
commit dd45cfc757

View file

@ -1325,10 +1325,6 @@ void D_SRB2Main(void)
midi_disabled = true;
#endif
}
else
{
CONS_Printf("S_InitSfxChannels(): Setting up sound channels.\n");
}
if (M_CheckParm("-nosound"))
sound_disabled = true;
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
@ -1347,10 +1343,18 @@ 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);
S_InitMusicDefs();
if (!( sound_disabled && digital_disabled
#ifndef NO_MIDI
&& midi_disabled
#endif
))
{
CONS_Printf("S_InitSfxChannels(): Setting up sound channels.\n");
I_StartupSound();
I_InitMusic();
S_InitSfxChannels(cv_soundvolume.value);
S_InitMusicDefs();
}
CONS_Printf("ST_Init(): Init status bar.\n");
ST_Init();