commit f353266628f25cd34a123a85687574a07a0b5caf
Author: ceski <56656010+ceski-1@users.noreply.github.com>
AuthorDate: Mon May 15 10:13:26 2023 -0700
Commit: ceski <56656010+ceski-1@users.noreply.github.com>
CommitDate: Mon May 15 10:13:26 2023 -0700
Remove reverb and chorus config keys
---
src/i_sound.c | 2 --
src/i_sound.h | 2 --
src/i_winmusic.c | 47 ++---------------------------------------------
src/m_config.c | 12 ------------
src/setup/sound.c | 4 ----
5 files changed, 2 insertions(+), 65 deletions(-)
diff --git a/src/i_sound.c b/src/i_sound.c
index 0b7bfc7f..6505fa15 100644
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -509,8 +509,6 @@ void I_BindSoundVariables(void)
M_BindStringVariable("winmm_midi_device", &winmm_midi_device);
M_BindIntVariable("winmm_reset_type", &winmm_reset_type);
M_BindIntVariable("winmm_reset_delay", &winmm_reset_delay);
- M_BindIntVariable("winmm_reverb_level", &winmm_reverb_level);
- M_BindIntVariable("winmm_chorus_level", &winmm_chorus_level);
#endif
#ifdef HAVE_FLUIDSYNTH
diff --git a/src/i_sound.h b/src/i_sound.h
index 7aa46bd3..e827d72c 100644
--- a/src/i_sound.h
+++ b/src/i_sound.h
@@ -274,8 +274,6 @@ extern char *timidity_cfg_path;
extern char *winmm_midi_device;
extern int winmm_reset_type;
extern int winmm_reset_delay;
-extern int winmm_reverb_level;
-extern int winmm_chorus_level;
#endif
// For FluidSynth module:
diff --git a/src/i_winmusic.c b/src/i_winmusic.c
index 4cfa43f5..54cd9437 100644
--- a/src/i_winmusic.c
+++ b/src/i_winmusic.c
@@ -35,8 +35,6 @@
#include "midifallback.h"
char *winmm_midi_device = NULL;
-int winmm_reverb_level = -1;
-int winmm_chorus_level = -1;
enum
{
@@ -319,46 +317,6 @@ static void ResetVolume(void)
}
}
-static void ResetReverb(int reset_type)
-{
- int i;
- int reverb = winmm_reverb_level;
-
- if (reverb == -1 && reset_type == RESET_TYPE_NONE)
- {
- // No reverb specified and no SysEx reset selected. Use GM default.
- reverb = 40;
- }
-
- if (reverb > -1)
- {
- for (i = 0; i < MIDI_CHANNELS_PER_TRACK; ++i)
- {
- SendShortMsg(0, MIDI_EVENT_CONTROLLER, i, MIDI_CONTROLLER_REVERB, reverb);
- }
- }
-}
-
-static void ResetChorus(int reset_type)
-{
- int i;
- int chorus = winmm_chorus_level;
-
- if (chorus == -1 && reset_type == RESET_TYPE_NONE)
- {
- // No chorus specified and no SysEx reset selected. Use GM default.
- chorus = 0;
- }
-
- if (chorus > -1)
- {
- for (i = 0; i < MIDI_CHANNELS_PER_TRACK; ++i)
- {
- SendShortMsg(0, MIDI_EVENT_CONTROLLER, i, MIDI_CONTROLLER_CHORUS, chorus);
- }
- }
-}
-
static void ResetControllers(void)
{
int i;
@@ -371,6 +329,8 @@ static void ResetControllers(void)
SendShortMsg(0, MIDI_EVENT_CONTROLLER, i, MIDI_CONTROLLER_BANK_SELECT_MSB, 0);
SendShortMsg(0, MIDI_EVENT_CONTROLLER, i, MIDI_CONTROLLER_BANK_SELECT_LSB, 0);
SendShortMsg(0, MIDI_EVENT_PROGRAM_CHANGE, i, 0, 0);
+ SendShortMsg(0, MIDI_EVENT_CONTROLLER, i, MIDI_CONTROLLER_REVERB, 40);
+ SendShortMsg(0, MIDI_EVENT_CONTROLLER, i, MIDI_CONTROLLER_CHORUS, 0);
}
}
@@ -479,9 +439,6 @@ static void ResetDevice(void)
ResetPitchBendSensitivity();
}
- ResetReverb(reset_type);
- ResetChorus(reset_type);
-
// Reset volume (initial playback or on shutdown if no SysEx reset).
if (initial_playback || reset_type == RESET_TYPE_NONE)
{
diff --git a/src/m_config.c b/src/m_config.c
index ecafdbaa..f411c6c7 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -1070,18 +1070,6 @@ static default_t extra_defaults_list[] =
//
CONFIG_VARIABLE_INT(winmm_reset_delay),
-
- //!
- // Reverb level for native Windows MIDI, default -1, range 0-127.
- //
-
- CONFIG_VARIABLE_INT(winmm_reverb_level),
-
- //!
- // Chorus level for native Windows MIDI, default -1, range 0-127.
- //
-
- CONFIG_VARIABLE_INT(winmm_chorus_level),
#endif
//!
diff --git a/src/setup/sound.c b/src/setup/sound.c
index 5b148d98..a8191a6c 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -86,8 +86,6 @@ static int midi_index;
char *winmm_midi_device = NULL;
int winmm_reset_type = -1;
int winmm_reset_delay = 0;
-int winmm_reverb_level = -1;
-int winmm_chorus_level = -1;
#endif
#ifdef HAVE_FLUIDSYNTH
@@ -361,8 +359,6 @@ void BindSoundVariables(void)
M_BindStringVariable("winmm_midi_device", &winmm_midi_device);
M_BindIntVariable("winmm_reset_type", &winmm_reset_type);
M_BindIntVariable("winmm_reset_delay", &winmm_reset_delay);
- M_BindIntVariable("winmm_reverb_level", &winmm_reverb_level);
- M_BindIntVariable("winmm_chorus_level", &winmm_chorus_level);
#endif
#ifdef HAVE_FLUIDSYNTH