From a6ccb8491ed3af303df03598910140ddf9a9ca3d Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 7 Dec 2025 17:09:43 +0100 Subject: [PATCH] Revert "Add chorus and reverb settings to MIDI" This reverts commit 641439cbba0f91a7f2632b1089f3218bf8fe3ce5. --- src/m_menu.c | 1 + src/s_sound.c | 6 ------ src/s_sound.h | 6 ------ src/sdl/sdl_sound.c | 26 ++------------------------ 4 files changed, 3 insertions(+), 36 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 23d4b5a31..4c3b54120 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -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) diff --git a/src/s_sound.c b/src/s_sound.c index dfe2e1629..f9aa251de 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -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 diff --git a/src/s_sound.h b/src/s_sound.h index 89092c891..2bd61af40 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -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; diff --git a/src/sdl/sdl_sound.c b/src/sdl/sdl_sound.c index 36e0b1356..259d4ac93 100644 --- a/src/sdl/sdl_sound.c +++ b/src/sdl/sdl_sound.c @@ -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) {