foxygit / doom Log in
commit a8c4c51deeb59783c54fe40f3f47018712527ad3
Author:     Jonathan Dowland <jon+github@alcopop.org>
AuthorDate: Mon Jul 6 21:41:24 2015 +0100
Commit:     Jonathan Dowland <jon+github@alcopop.org>
CommitDate: Wed Jul 8 21:02:01 2015 +0100

    snd_pitchshift defaults off, except Raven games

    Tweak snd_pitchshift to clearly default to off and switch the
    default to on only for Heretic and Hexen (since all versions of
    Heretic and Hexen did pitch-shifting).

    Pitch shifting was never implemented for Strife, so hide the option
    in chocolate-strife-setup entirely.
---
 src/setup/sound.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/setup/sound.c b/src/setup/sound.c
index 3f6a3871..c6ddaffa 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -290,6 +290,14 @@ void ConfigSound(void)
         num_music_modes = NUM_MUSICMODES - 1;
     }

+    // All versions of Heretic and Hexen did pitch-shifting.
+    // Most versions of Doom did not and Strife never did.
+
+    if(gamemission == heretic || gamemission == hexen)
+    {
+        snd_pitchshift = 1;
+    }
+
     // Build the window

     window = TXT_NewWindow("Sound configuration");
@@ -315,9 +323,16 @@ void ConfigSound(void)
                    TXT_NewSpinControl(&numChannels, 1, 8),
                    TXT_NewLabel("SFX volume"),
                    TXT_NewSpinControl(&sfxVolume, 0, 15),
-                   TXT_NewCheckBox("Pitch-shift sounds", &snd_pitchshift),
                    NULL);

+    // strife did not implement pitch shifting at all, so hide the option.
+
+    if (gamemission != strife)
+    {
+        TXT_AddWidget(sfx_table,
+                   TXT_NewCheckBox("Pitch-shift sounds", &snd_pitchshift));
+    }
+
     if (gamemission == strife)
     {
         TXT_AddWidgets(sfx_table,