Revert "Add chorus and reverb settings to MIDI"

This reverts commit 641439cbba.
This commit is contained in:
Alug committed 2025-12-07 17:09:43 +01:00
1 parent 38d6fc8112
commit a6ccb8491e
4 files changed
+3 -36

No files matched your search

+1
View File
@@ -528,6 +528,7 @@ static INT32 M_ShiftChar(INT32 ch)
// Pretty and consistent ^u^
// See also G_GetGametypeColor.
//
static INT32 highlightflags, recommendedflags, warningflags;
inline static void M_GetGametypeColor(void)
-6
View File
@@ -273,12 +273,6 @@ void S_RegisterSoundStuff(void)
CV_RegisterVar(&cv_gamesounds);
CV_RegisterVar(&cv_gamedigimusic);
#ifdef HAVE_FLUIDSYNTH
CV_RegisterVar(&cv_midisoundfontpath);
CV_RegisterVar(&cv_midichorus);
CV_RegisterVar(&cv_midireverb);
#endif
CV_RegisterVar(&cv_samesoundlimit);
// bird music stuff
-6
View File
@@ -56,12 +56,6 @@ extern consvar_t cv_amigatype;
boolean S_MapMusPlaying(void);
#ifdef HAVE_FLUIDSYNTH
extern consvar_t cv_midisoundfontpath;
extern consvar_t cv_midichorus;
extern consvar_t cv_midireverb;
#endif
//bird music stuff
extern consvar_t cv_invincmusicfade;
extern consvar_t cv_growmusicfade;
+2 -24
View File
@@ -131,27 +131,7 @@ static void MidiSoundfontPath_Onchange(void)
SDL_UnlockAudioStream(audio_stream);
}
static void MidiChorus_OnChange(void)
{
if (synth_settings != NULL)
{
fluid_settings_setnum(synth_settings, "synth.chorus.active", cv_midichorus.value > 0);
fluid_settings_setnum(synth_settings, "synth.chorus.level", FixedToFloat(cv_midichorus.value));
}
}
static void MidiReverb_OnChange(void)
{
if (synth_settings != NULL)
{
fluid_settings_setnum(synth_settings, "synth.reverb.active", cv_midireverb.value > 0);
fluid_settings_setnum(synth_settings, "synth.reverb.level", FixedToFloat(cv_midireverb.value));
}
}
consvar_t cv_midisoundfontpath = CVAR_INIT ("midisoundfont", "sf2/GeneralUser-GS.sf2", "Which MIDI soundfont to use", CV_CALL|CV_NOINIT|CV_SAVE, NULL, MidiSoundfontPath_Onchange);
consvar_t cv_midichorus = CVAR_INIT ("midichorus", "1", "Controls the chorus level of MIDI playback; setting this too high might cause some instruments to be overexposed", CV_CALL|CV_SAVE|CV_FLOAT, CV_Unsigned, MidiChorus_OnChange);
consvar_t cv_midireverb = CVAR_INIT ("midireverb", "1", "Controls the reverb level of MIDI playback; setting this too high might cause notes to be drawn out", CV_CALL|CV_SAVE|CV_FLOAT, CV_Unsigned, MidiReverb_OnChange);
#endif
//FIXME: this is not how it should be lol
@@ -1097,10 +1077,8 @@ void I_InitMusic(void)
synth_settings = new_fluid_settings();
fluid_settings_setnum(synth_settings, "synth.gain", 1.0f);
fluid_settings_setnum(synth_settings, "synth.sample-rate", virtual_spec.freq);
fluid_settings_setnum(synth_settings, "synth.chorus.active", cv_midichorus.value > 0);
fluid_settings_setnum(synth_settings, "synth.chorus.level", cv_midichorus.value);
fluid_settings_setnum(synth_settings, "synth.reverb.active", cv_midireverb.value > 0);
fluid_settings_setnum(synth_settings, "synth.reverb.level", cv_midireverb.value);
fluid_settings_setnum(synth_settings, "synth.chorus.level", 0.0f);
fluid_settings_setnum(synth_settings, "synth.reverb.level", 0.0f);
synth = new_fluid_synth(synth_settings);
if (synth == NULL)
{