summaryrefslogtreecommitdiff
path: root/src/i_sound.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i_sound.c')
-rw-r--r--src/i_sound.c37
1 files changed, 31 insertions, 6 deletions
diff --git a/src/i_sound.c b/src/i_sound.c
index fbf5768c..bdb82c53 100644
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -453,12 +453,37 @@ I_InitSound()
channels_playing[i] = sfx_None;
}
- nomusicparm = M_CheckParm("-nomusic") > 0
- || M_CheckParm("-nosound") > 0
- || snd_musicdevice < SNDDEVICE_ADLIB;
- nosfxparm = M_CheckParm("-nosfx") > 0
- || M_CheckParm("-nosound") > 0
- || snd_sfxdevice < SNDDEVICE_SB;
+ //!
+ // Disable music playback.
+ //
+
+ nomusicparm = M_CheckParm("-nomusic") > 0;
+
+ if (snd_musicdevice < SNDDEVICE_ADLIB)
+ {
+ nomusicparm = true;
+ }
+
+ //!
+ // Disable sound effects.
+ //
+
+ nosfxparm = M_CheckParm("-nosfx") > 0;
+
+ if (snd_sfxdevice < SNDDEVICE_SB)
+ {
+ nosfxparm = true;
+ }
+
+ //!
+ // Disable sound effects and music.
+ //
+
+ if (M_CheckParm("-nosound") > 0)
+ {
+ nosfxparm = true;
+ nomusicparm = true;
+ }
// If music or sound is going to play, we need to at least
// initialise SDL