summaryrefslogtreecommitdiff
path: root/src/setup/sound.c
diff options
context:
space:
mode:
authorSimon Howard2014-03-27 21:39:34 -0400
committerSimon Howard2014-03-27 21:39:34 -0400
commit5412004bfa32864c1034e81ee7b093d8887850f5 (patch)
tree742dbd6e16c695bfac5db40ab2fef24c9d44ec4d /src/setup/sound.c
parentf09667a3da971dc0fd4d4638d5c12a363d8b3945 (diff)
downloadchocolate-doom-5412004bfa32864c1034e81ee7b093d8887850f5.tar.gz
chocolate-doom-5412004bfa32864c1034e81ee7b093d8887850f5.tar.bz2
chocolate-doom-5412004bfa32864c1034e81ee7b093d8887850f5.zip
setup: Make default sound volumes match Vanilla.
Doom, Heretic, Hexen and Strife have different default SFX and music volumes. Make sure the setup tool sets the appropriate default when creating a new configuration file. Thanks to Alexandre-Xavier for reporting this and providing the correct defaults. This fixes #347.
Diffstat (limited to 'src/setup/sound.c')
-rw-r--r--src/setup/sound.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/setup/sound.c b/src/setup/sound.c
index f1603e84..9ce6757c 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -78,8 +78,8 @@ int snd_maxslicetime_ms = 28;
char *snd_musiccmd = "";
static int numChannels = 8;
-static int sfxVolume = 15;
-static int musicVolume = 15;
+static int sfxVolume = 8;
+static int musicVolume = 8;
static int voiceVolume = 15;
static int show_talk = 0;
static int use_libsamplerate = 0;
@@ -334,6 +334,23 @@ void BindSoundVariables(void)
timidity_cfg_path = strdup("");
gus_patch_path = strdup("");
+ // Default sound volumes - different games use different values.
+
+ switch (gamemission)
+ {
+ case doom:
+ default:
+ sfxVolume = 8; musicVolume = 8;
+ break;
+ case heretic:
+ case hexen:
+ sfxVolume = 10; musicVolume = 10;
+ break;
+ case strife:
+ sfxVolume = 8; musicVolume = 13;
+ break;
+ }
+
// Before SDL_mixer version 1.2.11, MIDI music caused the game
// to crash when it looped. If this is an old SDL_mixer version,
// disable MIDI.