From f4ca6001d8e2fecbe48493c933883ca1093eefbf Mon Sep 17 00:00:00 2001
From: James R <justsomejames2@gmail.com>
Date: Thu, 24 Aug 2023 04:56:02 -0700
Subject: [PATCH] s_sound: remove unused OpenMPT stuff

---
 src/s_sound.c | 23 -----------------------
 src/s_sound.h | 12 ------------
 2 files changed, 35 deletions(-)

diff --git a/src/s_sound.c b/src/s_sound.c
index 931040814c..e6abc17917 100644
--- a/src/s_sound.c
+++ b/src/s_sound.c
@@ -59,10 +59,6 @@ static void GameDigiMusic_OnChange(void);
 static void PlayMusicIfUnfocused_OnChange(void);
 static void PlaySoundIfUnfocused_OnChange(void);
 
-#ifdef HAVE_OPENMPT
-static void ModFilter_OnChange(void);
-#endif
-
 // stereo reverse
 consvar_t stereoreverse = CVAR_INIT ("stereoreverse", "Off", CV_SAVE, CV_OnOff, NULL);
 
@@ -95,13 +91,6 @@ consvar_t cv_gamesounds = CVAR_INIT ("sounds", "On", CV_SAVE|CV_CALL|CV_NOINIT,
 consvar_t cv_playmusicifunfocused = CVAR_INIT ("playmusicifunfocused",  "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, PlayMusicIfUnfocused_OnChange);
 consvar_t cv_playsoundifunfocused = CVAR_INIT ("playsoundsifunfocused", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, PlaySoundIfUnfocused_OnChange);
 
-#ifdef HAVE_OPENMPT
-openmpt_module *openmpt_mhandle = NULL;
-
-static CV_PossibleValue_t interpolationfilter_cons_t[] = {{0, "Default"}, {1, "None"}, {2, "Linear"}, {4, "Cubic"}, {8, "Windowed sinc"}, {0, NULL}};
-consvar_t cv_modfilter = CVAR_INIT ("modfilter", "0", CV_SAVE|CV_CALL, interpolationfilter_cons_t, ModFilter_OnChange);
-#endif
-
 #define S_MAX_VOLUME 127
 
 // when to clip out sounds
@@ -243,10 +232,6 @@ void S_RegisterSoundStuff(void)
 	CV_RegisterVar(&cv_gamesounds);
 	CV_RegisterVar(&cv_gamedigimusic);
 
-#ifdef HAVE_OPENMPT
-	CV_RegisterVar(&cv_modfilter);
-#endif
-
 	COM_AddCommand("tunes", Command_Tunes_f);
 	COM_AddCommand("restartaudio", Command_RestartAudio_f);
 	COM_AddCommand("playsound", Command_PlaySound);
@@ -2494,11 +2479,3 @@ static void PlaySoundIfUnfocused_OnChange(void)
 	if (window_notinfocus && !cv_playsoundifunfocused.value)
 		S_StopSounds();
 }
-
-#ifdef HAVE_OPENMPT
-void ModFilter_OnChange(void)
-{
-	if (openmpt_mhandle)
-		openmpt_module_set_render_param(openmpt_mhandle, OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH, cv_modfilter.value);
-}
-#endif
diff --git a/src/s_sound.h b/src/s_sound.h
index fd6e62e293..d101f307c4 100644
--- a/src/s_sound.h
+++ b/src/s_sound.h
@@ -19,18 +19,10 @@
 #include "command.h"
 #include "tables.h" // angle_t
 
-#ifdef HAVE_OPENMPT
-#include "libopenmpt/libopenmpt.h"
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifdef HAVE_OPENMPT
-extern openmpt_module *openmpt_mhandle;
-#endif
-
 // mask used to indicate sound origin is player item pickup
 #define PICKUP_SOUND 0x8000
 
@@ -52,10 +44,6 @@ extern consvar_t cv_gamesounds;
 extern consvar_t cv_playmusicifunfocused;
 extern consvar_t cv_playsoundifunfocused;
 
-#ifdef HAVE_OPENMPT
-extern consvar_t cv_modfilter;
-#endif
-
 extern CV_PossibleValue_t soundvolume_cons_t[];
 
 typedef enum
-- 
GitLab