ref: 17f3963bd8887d15868f583b7ba1f31b7dc097ab
parent: a8c4c51deeb59783c54fe40f3f47018712527ad3
author: Jonathan Dowland <[email protected]>
date: Wed Jul 8 17:31:42 EDT 2015
Default snd_pitchshift on for Heretic/Hexen Initialize snd_pitchshift to -1, to signal "not initialised". Each game engine sets a different default.
--- a/src/doom/s_sound.c
+++ b/src/doom/s_sound.c
@@ -142,6 +142,12 @@
S_sfx[i].lumpnum = S_sfx[i].usefulness = -1;
}
+ // Doom defaults to pitch-shifting off.
+ if(snd_pitchshift == -1)
+ {
+ snd_pitchshift = 0;
+ }
+
I_AtExit(S_Shutdown, true);
}
--- a/src/heretic/s_sound.c
+++ b/src/heretic/s_sound.c
@@ -524,6 +524,12 @@
I_AtExit(S_ShutDown, true);
+ // Heretic defaults to pitch-shifting on
+ if(snd_pitchshift == -1)
+ {
+ snd_pitchshift = 1;
+ }
+
I_PrecacheSounds(S_sfx, NUMSFX);
}
--- a/src/hexen/s_sound.c
+++ b/src/hexen/s_sound.c
@@ -800,6 +800,12 @@
I_AtExit(S_ShutDown, true);
+ // Hexen defaults to pitch-shifting on
+ if(snd_pitchshift == -1)
+ {
+ snd_pitchshift = 1;
+ }
+
I_PrecacheSounds(S_sfx, NUMSFX);
// Attempt to setup CD music
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -49,8 +49,9 @@
char *snd_musiccmd = "";
// Whether to vary the pitch of sound effects
+// Each game will set the default differently
-int snd_pitchshift = 0;
+int snd_pitchshift = -1;
// Low-level sound and music modules we are using