From dd45cfc757416b2d1d3d43b8049bcd883888792d Mon Sep 17 00:00:00 2001 From: james Date: Wed, 6 Feb 2019 17:24:13 -0800 Subject: [PATCH] Do not start sound system when disabled --- src/d_main.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 5cf95f4b..28f89f4f 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -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();