shithub: choc

Download patch

ref: 5412004bfa32864c1034e81ee7b093d8887850f5
parent: f09667a3da971dc0fd4d4638d5c12a363d8b3945
author: Simon Howard <[email protected]>
date: Thu Mar 27 17:39:34 EDT 2014

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.

--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -78,8 +78,8 @@
 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;
@@ -333,6 +333,23 @@
 
     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,