SDL_mixer: remove libmodplug support.

From 1ba148e3fffa37b6fccdbfc7dbd3c196225f23ff Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 9 Mar 2025 21:05:04 +0300
Subject: [PATCH] remove libmodplug support.

---
 CMakeLists.txt                                |  49 +--
 VisualC/SDL_mixer.vcxproj                     |   2 -
 VisualC/SDL_mixer.vcxproj.filters             |   6 -
 VisualC/external/include/libmodplug/modplug.h | 173 --------
 Xcode/SDL_mixer.xcodeproj/project.pbxproj     |   8 -
 .../resources/CMake/SDL3_mixerConfig.cmake    |   1 -
 .../cmake/SDL3_mixer/SDL3_mixerConfig.cmake   |   1 -
 Xcode/xmp/xmp.xcodeproj/project.pbxproj       |   2 +-
 build-scripts/android-prefab.sh               |   1 -
 .../android/aar/cmake/SDL3_mixerConfig.cmake  |   1 -
 build-scripts/release-info.json               |   3 -
 cmake/Findmodplug.cmake                       |  43 --
 cmake/SDL3_mixerConfig.cmake.in               |   5 -
 include/SDL3_mixer/SDL_mixer.h                |   2 +-
 src/codecs/music_modplug.c                    | 388 ------------------
 src/codecs/music_modplug.h                    |  28 --
 src/music.c                                   |   6 +-
 src/music.h                                   |   1 -
 18 files changed, 6 insertions(+), 714 deletions(-)
 delete mode 100644 VisualC/external/include/libmodplug/modplug.h
 delete mode 100644 cmake/Findmodplug.cmake
 delete mode 100644 src/codecs/music_modplug.c
 delete mode 100644 src/codecs/music_modplug.h

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2605266aa..97686fc22 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -138,15 +138,12 @@ option(SDLMIXER_GME_SHARED "Dynamically load libgme" "${SDLMIXER_DEPS_SHARED}")
 
 option(SDLMIXER_MOD "Support loading MOD music" ON)
 
-cmake_dependent_option(SDLMIXER_MOD_MODPLUG "Support loading MOD music via modplug" OFF SDLMIXER_MOD OFF)
-cmake_dependent_option(SDLMIXER_MOD_MODPLUG_SHARED "Dynamically load modplug" "${SDLMIXER_DEPS_SHARED}" SDLMIXER_MOD_MODPLUG OFF)
-
 cmake_dependent_option(SDLMIXER_MOD_XMP "Support loading MOD music via libxmp" ON SDLMIXER_MOD OFF)
 cmake_dependent_option(SDLMIXER_MOD_XMP_LITE "Use libxmp-lite instead of libxmp" OFF "SDLMIXER_MOD_XMP;NOT SDLMIXER_VENDORED" OFF)
 cmake_dependent_option(SDLMIXER_MOD_XMP_SHARED "Dynamically load libxmp(-lite)" "${SDLMIXER_DEPS_SHARED}" SDLMIXER_MOD_XMP OFF)
 
-if(SDLMIXER_MOD AND NOT (SDLMIXER_MOD_MODPLUG OR SDLMIXER_MOD_XMP))
-    message(FATAL_ERROR "MOD support was enabled (SDLMIXER_MOD) but neither modplug (SDLMIXER_MOD_MODPLUG) or xmp (SDLMIXER_MOD_XMP) was enabled.")
+if(SDLMIXER_MOD AND NOT SDLMIXER_MOD_XMP)
+    message(FATAL_ERROR "MOD support was enabled (SDLMIXER_MOD) but xmp (SDLMIXER_MOD_XMP) was enabled.")
 endif()
 
 option(SDLMIXER_MP3 "Enable MP3 music" ON)
@@ -258,7 +255,6 @@ add_library(${sdl3_mixer_target_name}
     src/codecs/music_fluidsynth.c
     src/codecs/music_gme.c
     src/codecs/music_minimp3.c
-    src/codecs/music_modplug.c
     src/codecs/music_mpg123.c
     src/codecs/music_nativemidi.c
     src/codecs/music_ogg.c
@@ -743,44 +739,6 @@ if(SDLMIXER_GME)
     endif()
 endif()
 
-list(APPEND SDLMIXER_BACKENDS MOD_MODPLUG)
-set(SDLMIXER_MOD_MODPLUG_ENABLED FALSE)
-if(SDLMIXER_MOD_MODPLUG)
-    if(SDLMIXER_VENDORED)
-        message(STATUS "Using vendored libmodplug")
-        message(${fatal_error} "libmodplug is not vendored.")
-    else()
-        find_package(modplug ${required})
-        if(modplug_FOUND)
-            set(SDLMIXER_MOD_MODPLUG_ENABLED TRUE)
-            message(STATUS "Using system libmodplug")
-            if(NOT SDLMIXER_MOD_MODPLUG_SHARED)
-                list(APPEND PC_REQUIRES libmodplug)
-            endif()
-        else()
-            message(${fatal_error} "libmodplug NOT found")
-        endif()
-    endif()
-    if(SDLMIXER_MOD_MODPLUG_ENABLED)
-        target_compile_definitions(${sdl3_mixer_target_name} PRIVATE MUSIC_MOD_MODPLUG)
-        if(SDLMIXER_MOD_MODPLUG_SHARED)
-            target_include_directories(${sdl3_mixer_target_name} PRIVATE
-                $<TARGET_PROPERTY:modplug::modplug,INCLUDE_DIRECTORIES>
-                $<TARGET_PROPERTY:modplug::modplug,INTERFACE_INCLUDE_DIRECTORIES>
-                $<TARGET_PROPERTY:modplug::modplug,INTERFACE_SYSTEM_INCLUDE_DIRECTORIES>
-            )
-            target_get_dynamic_library(dynamic_modplug modplug::modplug)
-            message(STATUS "Dynamic modplug: ${dynamic_modplug}")
-            target_compile_definitions(${sdl3_mixer_target_name} PRIVATE "MODPLUG_DYNAMIC=\"${dynamic_modplug}\"")
-            if(SDLMIXER_VENDORED)
-                add_dependencies(${sdl3_mixer_target_name} modplug::modplug)
-            endif()
-        else()
-            target_link_libraries(${sdl3_mixer_target_name} PRIVATE modplug::modplug)
-        endif()
-    endif()
-endif()
-
 list(APPEND SDLMIXER_BACKENDS MOD_XMP)
 set(SDLMIXER_MOD_XMP_ENABLED FALSE)
 if(SDLMIXER_MOD_XMP)
@@ -863,7 +821,7 @@ if(SDLMIXER_MOD_XMP)
 endif()
 
 set(SDLMIXER_MOD_ENABLED FALSE)
-if(SDLMIXER_MOD_MODPLUG_ENABLED OR SDLMIXER_MOD_XMP_ENABLED OR SDLMIXER_MOD_XMP_ENABLED)
+if(SDLMIXER_MOD_XMP_ENABLED)
     set(SDLMIXER_MOD_ENABLED TRUE)
 endif()
 
@@ -1164,7 +1122,6 @@ if(SDLMIXER_INSTALL)
                 cmake/Findgme.cmake
                 cmake/Findlibxmp.cmake
                 cmake/Findlibxmp-lite.cmake
-                cmake/Findmodplug.cmake
                 cmake/FindOgg.cmake
                 cmake/FindOpus.cmake
                 cmake/FindOpusFile.cmake
diff --git a/VisualC/SDL_mixer.vcxproj b/VisualC/SDL_mixer.vcxproj
index ccbe14d2b..7317e5539 100644
--- a/VisualC/SDL_mixer.vcxproj
+++ b/VisualC/SDL_mixer.vcxproj
@@ -226,7 +226,6 @@
     <ClInclude Include="..\src\codecs\music_fluidsynth.h" />
     <ClInclude Include="..\src\codecs\music_gme.h" />
     <ClInclude Include="..\src\codecs\music_minimp3.h" />
-    <ClInclude Include="..\src\codecs\music_modplug.h" />
     <ClInclude Include="..\src\codecs\music_mpg123.h" />
     <ClInclude Include="..\src\codecs\music_nativemidi.h" />
     <ClInclude Include="..\src\codecs\music_ogg.h" />
@@ -450,7 +449,6 @@
     <ClCompile Include="..\src\codecs\music_fluidsynth.c" />
     <ClCompile Include="..\src\codecs\music_gme.c" />
     <ClCompile Include="..\src\codecs\music_minimp3.c" />
-    <ClCompile Include="..\src\codecs\music_modplug.c" />
     <ClCompile Include="..\src\codecs\music_mpg123.c" />
     <ClCompile Include="..\src\codecs\music_nativemidi.c" />
     <ClCompile Include="..\src\codecs\music_ogg.c" />
diff --git a/VisualC/SDL_mixer.vcxproj.filters b/VisualC/SDL_mixer.vcxproj.filters
index dfd7adb20..024854f8d 100644
--- a/VisualC/SDL_mixer.vcxproj.filters
+++ b/VisualC/SDL_mixer.vcxproj.filters
@@ -43,9 +43,6 @@
     <ClInclude Include="..\src\codecs\music_minimp3.h">
       <Filter>Sources</Filter>
     </ClInclude>
-    <ClInclude Include="..\src\codecs\music_modplug.h">
-      <Filter>Sources</Filter>
-    </ClInclude>
     <ClInclude Include="..\src\codecs\music_mpg123.h">
       <Filter>Sources</Filter>
     </ClInclude>
@@ -179,9 +176,6 @@
     <ClCompile Include="..\src\codecs\music_minimp3.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\src\codecs\music_modplug.c">
-      <Filter>Sources</Filter>
-    </ClCompile>
     <ClCompile Include="..\src\codecs\music_mpg123.c">
       <Filter>Sources</Filter>
     </ClCompile>
diff --git a/VisualC/external/include/libmodplug/modplug.h b/VisualC/external/include/libmodplug/modplug.h
deleted file mode 100644
index 64e157c6a..000000000
--- a/VisualC/external/include/libmodplug/modplug.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * This source code is public domain.
- *
- * Authors: Kenton Varda <temporal@gauge3d.org> (C interface wrapper)
- */
-
-#ifndef MODPLUG_H__INCLUDED
-#define MODPLUG_H__INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(_WIN32) || defined(__CYGWIN__)
-# if defined(MODPLUG_BUILD) && defined(DLL_EXPORT)	/* building libmodplug as a dll for windows */
-#   define MODPLUG_EXPORT __declspec(dllexport)
-# elif defined(MODPLUG_BUILD) || defined(MODPLUG_STATIC)	/* building or using static libmodplug for windows */
-#   define MODPLUG_EXPORT
-# else
-#   define MODPLUG_EXPORT __declspec(dllimport)			/* using libmodplug dll for windows */
-# endif
-#elif defined(__OS2__) && defined(__WATCOMC__)
-# if defined(MODPLUG_BUILD) && defined(__SW_BD)		/* building libmodplug as a dll for os/2 */
-#   define MODPLUG_EXPORT __declspec(dllexport)
-# else
-#   define MODPLUG_EXPORT					/* using dll or static libmodplug for os/2 */
-# endif
-#elif defined(MODPLUG_BUILD) && defined(SYM_VISIBILITY)
-#   define MODPLUG_EXPORT __attribute__((visibility("default")))
-#else
-#define MODPLUG_EXPORT
-#endif
-
-struct _ModPlugFile;
-typedef struct _ModPlugFile ModPlugFile;
-
-struct _ModPlugNote {
-	unsigned char Note;
-	unsigned char Instrument;
-	unsigned char VolumeEffect;
-	unsigned char Effect;
-	unsigned char Volume;
-	unsigned char Parameter;
-};
-typedef struct _ModPlugNote ModPlugNote;
-
-typedef void (*ModPlugMixerProc)(int*, unsigned long, unsigned long);
-
-/* Load a mod file.  [data] should point to a block of memory containing the complete
- * file, and [size] should be the size of that block.
- * Return the loaded mod file on success, or NULL on failure. */
-MODPLUG_EXPORT ModPlugFile* ModPlug_Load(const void* data, int size);
-/* Unload a mod file. */
-MODPLUG_EXPORT void ModPlug_Unload(ModPlugFile* file);
-
-/* Read sample data into the buffer.  Returns the number of bytes read.  If the end
- * of the mod has been reached, zero is returned. */
-MODPLUG_EXPORT int  ModPlug_Read(ModPlugFile* file, void* buffer, int size);
-
-/* Get the name of the mod.  The returned buffer is stored within the ModPlugFile
- * structure and will remain valid until you unload the file. */
-MODPLUG_EXPORT const char* ModPlug_GetName(ModPlugFile* file);
-
-/* Get the length of the mod, in milliseconds.  Note that this result is not always
- * accurate, especially in the case of mods with loops. */
-MODPLUG_EXPORT int ModPlug_GetLength(ModPlugFile* file);
-
-/* Seek to a particular position in the song.  Note that seeking and MODs don't mix very
- * well.  Some mods will be missing instruments for a short time after a seek, as ModPlug
- * does not scan the sequence backwards to find out which instruments were supposed to be
- * playing at that time.  (Doing so would be difficult and not very reliable.)  Also,
- * note that seeking is not very exact in some mods -- especially those for which
- * ModPlug_GetLength() does not report the full length. */
-MODPLUG_EXPORT void ModPlug_Seek(ModPlugFile* file, int millisecond);
-
-enum _ModPlug_Flags
-{
-	MODPLUG_ENABLE_OVERSAMPLING     = 1 << 0,  /* Enable oversampling (*highly* recommended) */
-	MODPLUG_ENABLE_NOISE_REDUCTION  = 1 << 1,  /* Enable noise reduction */
-	MODPLUG_ENABLE_REVERB           = 1 << 2,  /* Enable reverb */
-	MODPLUG_ENABLE_MEGABASS         = 1 << 3,  /* Enable megabass */
-	MODPLUG_ENABLE_SURROUND         = 1 << 4   /* Enable surround sound. */
-};
-
-enum _ModPlug_ResamplingMode
-{
-	MODPLUG_RESAMPLE_NEAREST = 0,  /* No interpolation (very fast, extremely bad sound quality) */
-	MODPLUG_RESAMPLE_LINEAR  = 1,  /* Linear interpolation (fast, good quality) */
-	MODPLUG_RESAMPLE_SPLINE  = 2,  /* Cubic spline interpolation (high quality) */
-	MODPLUG_RESAMPLE_FIR     = 3   /* 8-tap fir filter (extremely high quality) */
-};
-
-typedef struct _ModPlug_Settings
-{
-	int mFlags;  /* One or more of the MODPLUG_ENABLE_* flags above, bitwise-OR'ed */
-
-	/* Note that ModPlug always decodes sound at 44100kHz, 32 bit, stereo and then
-	 * down-mixes to the settings you choose. */
-	int mChannels;       /* Number of channels - 1 for mono or 2 for stereo */
-	int mBits;           /* Bits per sample - 8, 16, or 32 */
-	int mFrequency;      /* Sampling rate - 11025, 22050, or 44100 */
-	int mResamplingMode; /* One of MODPLUG_RESAMPLE_*, above */
-
-	int mStereoSeparation; /* Stereo separation, 1 - 256 */
-	int mMaxMixChannels; /* Maximum number of mixing channels (polyphony), 32 - 256 */
-
-	int mReverbDepth;    /* Reverb level 0(quiet)-100(loud)      */
-	int mReverbDelay;    /* Reverb delay in ms, usually 40-200ms */
-	int mBassAmount;     /* XBass level 0(quiet)-100(loud)       */
-	int mBassRange;      /* XBass cutoff in Hz 10-100            */
-	int mSurroundDepth;  /* Surround level 0(quiet)-100(heavy)   */
-	int mSurroundDelay;  /* Surround delay in ms, usually 5-40ms */
-	int mLoopCount;      /* Number of times to loop.  Zero prevents looping.
-			      * -1 loops forever. */
-} ModPlug_Settings;
-
-/* Get and set the mod decoder settings.  All options, except for channels, bits-per-sample,
- * sampling rate, and loop count, will take effect immediately.  Those options which don't
- * take effect immediately will take effect the next time you load a mod. */
-MODPLUG_EXPORT void ModPlug_GetSettings(ModPlug_Settings* settings);
-MODPLUG_EXPORT void ModPlug_SetSettings(const ModPlug_Settings* settings);
-
-/* New ModPlug API Functions */
-/* NOTE: Master Volume (1-512) */
-MODPLUG_EXPORT unsigned int ModPlug_GetMasterVolume(ModPlugFile* file) ;
-MODPLUG_EXPORT void ModPlug_SetMasterVolume(ModPlugFile* file,unsigned int cvol) ;
-
-MODPLUG_EXPORT int ModPlug_GetCurrentSpeed(ModPlugFile* file);
-MODPLUG_EXPORT int ModPlug_GetCurrentTempo(ModPlugFile* file);
-MODPLUG_EXPORT int ModPlug_GetCurrentOrder(ModPlugFile* file);
-MODPLUG_EXPORT int ModPlug_GetCurrentPattern(ModPlugFile* file);
-MODPLUG_EXPORT int ModPlug_GetCurrentRow(ModPlugFile* file);
-MODPLUG_EXPORT int ModPlug_GetPlayingChannels(ModPlugFile* file);
-
-MODPLUG_EXPORT void ModPlug_SeekOrder(ModPlugFile* file,int order);
-MODPLUG_EXPORT int ModPlug_GetModuleType(ModPlugFile* file);
-MODPLUG_EXPORT char* ModPlug_GetMessage(ModPlugFile* file);
-
-MODPLUG_EXPORT unsigned int ModPlug_NumInstruments(ModPlugFile* file);
-MODPLUG_EXPORT unsigned int ModPlug_NumSamples(ModPlugFile* file);
-MODPLUG_EXPORT unsigned int ModPlug_NumPatterns(ModPlugFile* file);
-MODPLUG_EXPORT unsigned int ModPlug_NumChannels(ModPlugFile* file);
-MODPLUG_EXPORT unsigned int ModPlug_SampleName(ModPlugFile* file, unsigned int qual, char* buff);
-MODPLUG_EXPORT unsigned int ModPlug_InstrumentName(ModPlugFile* file, unsigned int qual, char* buff);
-
-/*
- * Retrieve pattern note-data
- */
-MODPLUG_EXPORT ModPlugNote* ModPlug_GetPattern(ModPlugFile* file, int pattern, unsigned int* numrows);
-
-/*
- * =================
- * Mixer callback
- * =================
- *
- * Use this callback if you want to 'modify' the mixed data of LibModPlug.
- * 
- * void proc(int* buffer,unsigned long channels,unsigned long nsamples) ;
- *
- * 'buffer': A buffer of mixed samples
- * 'channels': N. of channels in the buffer
- * 'nsamples': N. of samples in the buffeer (without taking care of n.channels)
- *
- * (Samples are signed 32-bit integers)
- */
-MODPLUG_EXPORT void ModPlug_InitMixerCallback(ModPlugFile* file,ModPlugMixerProc proc) ;
-MODPLUG_EXPORT void ModPlug_UnloadMixerCallback(ModPlugFile* file) ;
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* MODPLUG_H__INCLUDED */
diff --git a/Xcode/SDL_mixer.xcodeproj/project.pbxproj b/Xcode/SDL_mixer.xcodeproj/project.pbxproj
index 6c3536609..3558ce332 100644
--- a/Xcode/SDL_mixer.xcodeproj/project.pbxproj
+++ b/Xcode/SDL_mixer.xcodeproj/project.pbxproj
@@ -51,8 +51,6 @@
 		AAE405E51F9607C300EDAF53 /* mixer.c in Sources */ = {isa = PBXBuildFile; fileRef = AAE405C11F9607C000EDAF53 /* mixer.c */; };
 		AAE405E61F9607C300EDAF53 /* music.h in Headers */ = {isa = PBXBuildFile; fileRef = AAE405C21F9607C000EDAF53 /* music.h */; };
 		AAE405E71F9607C300EDAF53 /* load_voc.h in Headers */ = {isa = PBXBuildFile; fileRef = AAE405C31F9607C000EDAF53 /* load_voc.h */; };
-		AAE405E81F9607C300EDAF53 /* music_modplug.c in Sources */ = {isa = PBXBuildFile; fileRef = AAE405C41F9607C000EDAF53 /* music_modplug.c */; };
-		AAE405E91F9607C300EDAF53 /* music_modplug.h in Headers */ = {isa = PBXBuildFile; fileRef = AAE405C51F9607C000EDAF53 /* music_modplug.h */; };
 		AAE405EA1F9607C300EDAF53 /* music_fluidsynth.c in Sources */ = {isa = PBXBuildFile; fileRef = AAE405C61F9607C000EDAF53 /* music_fluidsynth.c */; };
 		AAE405EB1F9607C300EDAF53 /* music_flac.h in Headers */ = {isa = PBXBuildFile; fileRef = AAE405C71F9607C000EDAF53 /* music_flac.h */; };
 		AAE405EC1F9607C300EDAF53 /* music_wav.h in Headers */ = {isa = PBXBuildFile; fileRef = AAE405C81F9607C000EDAF53 /* music_wav.h */; };
@@ -190,8 +188,6 @@
 		AAE405C11F9607C000EDAF53 /* mixer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mixer.c; sourceTree = "<group>"; };
 		AAE405C21F9607C000EDAF53 /* music.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = music.h; sourceTree = "<group>"; };
 		AAE405C31F9607C000EDAF53 /* load_voc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = load_voc.h; sourceTree = "<group>"; };
-		AAE405C41F9607C000EDAF53 /* music_modplug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = music_modplug.c; sourceTree = "<group>"; };
-		AAE405C51F9607C000EDAF53 /* music_modplug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = music_modplug.h; sourceTree = "<group>"; };
 		AAE405C61F9607C000EDAF53 /* music_fluidsynth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = music_fluidsynth.c; sourceTree = "<group>"; };
 		AAE405C71F9607C000EDAF53 /* music_flac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = music_flac.h; sourceTree = "<group>"; };
 		AAE405C81F9607C000EDAF53 /* music_wav.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = music_wav.h; sourceTree = "<group>"; };
@@ -334,8 +330,6 @@
 				F3F8794A29B30FDA0007FDA1 /* music_gme.h */,
 				F307A52D2B5473760012534B /* music_minimp3.c */,
 				F307A52E2B5473760012534B /* music_minimp3.h */,
-				AAE405C41F9607C000EDAF53 /* music_modplug.c */,
-				AAE405C51F9607C000EDAF53 /* music_modplug.h */,
 				AAE405DF1F9607C300EDAF53 /* music_mpg123.c */,
 				AAE405D31F9607C100EDAF53 /* music_mpg123.h */,
 				AAE405D51F9607C100EDAF53 /* music_nativemidi.c */,
@@ -468,7 +462,6 @@
 				F307A5302B5473760012534B /* music_minimp3.h in Headers */,
 				AAE405E71F9607C300EDAF53 /* load_voc.h in Headers */,
 				AAE405EC1F9607C300EDAF53 /* music_wav.h in Headers */,
-				AAE405E91F9607C300EDAF53 /* music_modplug.h in Headers */,
 				AAE405FE1F9607C300EDAF53 /* music_nativemidi.h in Headers */,
 				F37A8D4A2838A23400C38E95 /* music_drflac.h in Headers */,
 				F30240632881DF95002F32D6 /* music_xmp.h in Headers */,
@@ -695,7 +688,6 @@
 				AAE405ED1F9607C300EDAF53 /* music_wav.c in Sources */,
 				F30240652881DF95002F32D6 /* music_xmp.c in Sources */,
 				F307A52F2B5473760012534B /* music_minimp3.c in Sources */,
-				AAE405E81F9607C300EDAF53 /* music_modplug.c in Sources */,
 				AAE405E51F9607C300EDAF53 /* mixer.c in Sources */,
 				0448E8AE108B937A00C9D3EA /* native_midi_macosx.c in Sources */,
 				630FBD8320D52105009867AB /* music_opus.c in Sources */,
diff --git a/Xcode/pkg-support/resources/CMake/SDL3_mixerConfig.cmake b/Xcode/pkg-support/resources/CMake/SDL3_mixerConfig.cmake
index ffb27bda7..73e5c95b2 100644
--- a/Xcode/pkg-support/resources/CMake/SDL3_mixerConfig.cmake
+++ b/Xcode/pkg-support/resources/CMake/SDL3_mixerConfig.cmake
@@ -31,7 +31,6 @@ set(SDLMIXER_FLAC_DRFLAC           TRUE)
 set(SDLMIXER_GME                   TRUE)
 
 set(SDLMIXER_MOD                   FALSE)
-set(SDLMIXER_MOD_MODPLUG           FALSE)
 set(SDLMIXER_MOD_XMP               TRUE)
 set(SDLMIXER_MOD_XMP_LITE          TRUE)
 
diff --git a/Xcode/pkg-support/share/cmake/SDL3_mixer/SDL3_mixerConfig.cmake b/Xcode/pkg-support/share/cmake/SDL3_mixer/SDL3_mixerConfig.cmake
index 63440ebe9..6c7b1285f 100644
--- a/Xcode/pkg-support/share/cmake/SDL3_mixer/SDL3_mixerConfig.cmake
+++ b/Xcode/pkg-support/share/cmake/SDL3_mixer/SDL3_mixerConfig.cmake
@@ -92,7 +92,6 @@ set(SDLMIXER_FLAC_DRFLAC           TRUE)
 set(SDLMIXER_GME                   TRUE)
 
 set(SDLMIXER_MOD                   FALSE)
-set(SDLMIXER_MOD_MODPLUG           FALSE)
 set(SDLMIXER_MOD_XMP               TRUE)
 set(SDLMIXER_MOD_XMP_LITE          TRUE)
 
diff --git a/Xcode/xmp/xmp.xcodeproj/project.pbxproj b/Xcode/xmp/xmp.xcodeproj/project.pbxproj
index 6557f0abf..f7c82c365 100644
--- a/Xcode/xmp/xmp.xcodeproj/project.pbxproj
+++ b/Xcode/xmp/xmp.xcodeproj/project.pbxproj
@@ -389,7 +389,7 @@
 			dependencies = (
 			);
 			name = xmp;
-			productName = libmodplug;
+			productName = libxmp;
 			productReference = F3968D85281FBB1900661875 /* xmp.framework */;
 			productType = "com.apple.product-type.framework";
 		};
diff --git a/build-scripts/android-prefab.sh b/build-scripts/android-prefab.sh
index 25b1f4d6e..5e1187262 100755
--- a/build-scripts/android-prefab.sh
+++ b/build-scripts/android-prefab.sh
@@ -73,7 +73,6 @@ build_cmake_projects() {
                 -DWITH_ASM=OFF \
                 -DSDLMIXER_FLAC_LIBFLAC=ON \
                 -DSDLMIXER_MOD=ON \
-                -DSDLMIXER_MOD_MODPLUG=OFF \
                 -DSDLMIXER_MOD_XMP=ON \
                 -DSDLMIXER_MP3=ON \
                 -DSDLMIXER_MP3_MPG123=ON \
diff --git a/build-scripts/pkg-support/android/aar/cmake/SDL3_mixerConfig.cmake b/build-scripts/pkg-support/android/aar/cmake/SDL3_mixerConfig.cmake
index 6364238c5..80de10974 100644
--- a/build-scripts/pkg-support/android/aar/cmake/SDL3_mixerConfig.cmake
+++ b/build-scripts/pkg-support/android/aar/cmake/SDL3_mixerConfig.cmake
@@ -38,7 +38,6 @@ set(SDLMIXER_FLAC_DRFLAC           TRUE)
 set(SDLMIXER_GME                   FALSE)
 
 set(SDLMIXER_MOD                   FALSE)
-set(SDLMIXER_MOD_MODPLUG           FALSE)
 set(SDLMIXER_MOD_XMP               FALSE)
 set(SDLMIXER_MOD_XMP_LITE          FALSE)
 
diff --git a/build-scripts/release-info.json b/build-scripts/release-info.json
index bea81e8bd..8e71f91a0 100644
--- a/build-scripts/release-info.json
+++ b/build-scripts/release-info.json
@@ -41,7 +41,6 @@
         "-DSDLMIXER_FLAC_DRFLAC=ON",
         "-DSDLMIXER_GME=OFF",
         "-DSDLMIXER_MOD=OFF",
-        "-DSDLMIXER_MOD_MODPLUG=OFF",
         "-DSDLMIXER_MOD_XMP=OFF",
         "-DSDLMIXER_MP3=ON",
         "-DSDLMIXER_MP3_MINIMP3=ON",
@@ -140,7 +139,6 @@
         "-DSDLMIXER_FLAC_DRFLAC=ON",
         "-DSDLMIXER_GME=ON",
         "-DSDLMIXER_MOD=ON",
-        "-DSDLMIXER_MOD_MODPLUG=OFF",
         "-DSDLMIXER_MOD_XMP=ON",
         "-DSDLMIXER_MP3=ON",
         "-DSDLMIXER_MP3_MINIMP3=ON",
@@ -230,7 +228,6 @@
         "-DSDLMIXER_FLAC_DRFLAC=ON",
         "-DSDLMIXER_GME=OFF",
         "-DSDLMIXER_MOD=OFF",
-        "-DSDLMIXER_MOD_MODPLUG=OFF",
         "-DSDLMIXER_MOD_XMP=OFF",
         "-DSDLMIXER_MP3=ON",
         "-DSDLMIXER_MP3_MINIMP3=ON",
diff --git a/cmake/Findmodplug.cmake b/cmake/Findmodplug.cmake
deleted file mode 100644
index af1e82ea3..000000000
--- a/cmake/Findmodplug.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-include(FindPackageHandleStandardArgs)
-
-find_package(PkgConfig QUIET)
-pkg_check_modules(PC_MODPLUG QUIET libmodplug)
-
-find_library(modplug_LIBRARY
-    NAMES modplug
-)
-
-find_path(modplug_INCLUDE_PATH
-    NAMES libmodplug/modplug.h
-)
-
-if(PC_MODPLUG_FOUND)
-    get_flags_from_pkg_config("${modplug_LIBRARY}" "PC_MODPLUG" "_modplug")
-endif()
-
-set(modplug_COMPILE_OPTIONS "${_modplug_compile_options}" CACHE STRING "Extra compile options of modplug")
-
-set(modplug_LINK_LIBRARIES "${_modplug_link_libraries}" CACHE STRING "Extra link libraries of modplug")
-
-set(modplug_LINK_OPTIONS "${_modplug_link_options}" CACHE STRING "Extra link flags of modplug")
-
-set(modplug_LINK_DIRECTORIES "${_modplug_link_directories}" CACHE PATH "Extra link directories of modplug")
-
-find_package_handle_standard_args(modplug
-    REQUIRED_VARS modplug_LIBRARY modplug_INCLUDE_PATH
-)
-
-if (modplug_FOUND)
-    if (NOT TARGET modplug::modplug)
-        add_library(modplug::modplug UNKNOWN IMPORTED)
-        set_target_properties(modplug::modplug PROPERTIES
-            IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
-            IMPORTED_LOCATION "${modplug_LIBRARY}"
-            INTERFACE_INCLUDE_DIRECTORIES "${modplug_INCLUDE_PATH}"
-            INTERFACE_COMPILE_OPTIONS "${modplug_COMPILE_OPTIONS}"
-            INTERFACE_LINK_LIBRARIES "${modplug_LINK_LIBRARIES}"
-            INTERFACE_LINK_OPTIONS "${modplug_LINK_OPTIONS}"
-            INTERFACE_LINK_DIRECTORIES "${modplug_LINK_DIRECTORIES}"
-        )
-    endif()
-endif()
diff --git a/cmake/SDL3_mixerConfig.cmake.in b/cmake/SDL3_mixerConfig.cmake.in
index 51b4bfd7d..4e7e96236 100644
--- a/cmake/SDL3_mixerConfig.cmake.in
+++ b/cmake/SDL3_mixerConfig.cmake.in
@@ -21,7 +21,6 @@ set(SDLMIXER_FLAC_DRFLAC           @SDLMIXER_FLAC_DRFLAC_ENABLED@)
 set(SDLMIXER_GME                   @SDLMIXER_GME_ENABLED@)
 
 set(SDLMIXER_MOD                   @SDLMIXER_MOD_ENABLED@)
-set(SDLMIXER_MOD_MODPLUG           @SDLMIXER_MOD_MODPLUG_ENABLED@)
 set(SDLMIXER_MOD_XMP               @SDLMIXER_MOD_XMP_ENABLED@)
 set(SDLMIXER_MOD_XMP_LITE          @SDLMIXER_MOD_XMP_ENABLED@)
 
@@ -83,10 +82,6 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3_mixer-static-targets.cmake")
             find_dependency(FLAC)
         endif()
 
-        if(SDLMIXER_MOD_MODPLUG AND NOT TARGET modplug::modplug)
-            find_dependency(modplug)
-        endif()
-
         if(SDLMIXER_MOD_XMP AND NOT TARGET libxmp::libxmp)
             find_dependency(libxmp)
         endif()
diff --git a/include/SDL3_mixer/SDL_mixer.h b/include/SDL3_mixer/SDL_mixer.h
index 058d4127f..71ebdb8ab 100644
--- a/include/SDL3_mixer/SDL_mixer.h
+++ b/include/SDL3_mixer/SDL_mixer.h
@@ -2280,7 +2280,7 @@ extern SDL_DECLSPEC int SDLCALL Mix_GetNumTracks(Mix_Music *music);
  * To convert from milliseconds, divide by 1000.0.
  *
  * This function is only implemented for MOD music formats (set pattern order
- * number) and for WAV, OGG, FLAC, MP3, and MODPLUG music at the moment.
+ * number) and for WAV, OGG, FLAC, MP3, and MOD music at the moment.
  *
  * \param position the new position, in seconds (as a double).
  * \returns true on success or false on failure; call SDL_GetError() for more
diff --git a/src/codecs/music_modplug.c b/src/codecs/music_modplug.c
deleted file mode 100644
index 3be55d953..000000000
--- a/src/codecs/music_modplug.c
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
-  SDL_mixer:  An audio mixer library based on the SDL library
-  Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifdef MUSIC_MOD_MODPLUG
-
-#include <SDL3/SDL_loadso.h>
-
-#include "music_modplug.h"
-
-#ifdef MODPLUG_HEADER
-#include MODPLUG_HEADER
-#else
-#include <libmodplug/modplug.h>
-#endif
-
-typedef struct {
-    int loaded;
-    void *handle;
-
-    ModPlugFile* (*ModPlug_Load)(const void* data, int size);
-    void (*ModPlug_Unload)(ModPlugFile* file);
-    int  (*ModPlug_Read)(ModPlugFile* file, void* buffer, int size);
-    void (*ModPlug_Seek)(ModPlugFile* file, int millisecond);
-    void (*ModPlug_SeekOrder)(ModPlugFile* file, int order);
-    int  (*ModPlug_Tell)(ModPlugFile* file);
-    int  (*ModPlug_GetLength)(ModPlugFile* file);
-    void (*ModPlug_GetSettings)(ModPlug_Settings* settings);
-    void (*ModPlug_SetSettings)(const ModPlug_Settings* settings);
-    void (*ModPlug_SetMasterVolume)(ModPlugFile* file,unsigned int cvol);
-    const char* (*ModPlug_GetName)(ModPlugFile* file);
-} modplug_loader;
-
-static modplug_loader modplug;
-
-static ModPlug_Settings settings;
-
-#ifdef MODPLUG_DYNAMIC
-#define FUNCTION_LOADER(FUNC, SIG) \
-    modplug.FUNC = (SIG) SDL_LoadFunction(modplug.handle, #FUNC); \
-    if (modplug.FUNC == NULL) { SDL_UnloadObject(modplug.handle); return -1; }
-#else
-#define FUNCTION_LOADER(FUNC, SIG) \
-    modplug.FUNC = FUNC; \
-    if (modplug.FUNC == NULL) { SDL_SetError("Missing libmodplug.framework"); return -1; }
-#endif
-
-#ifdef __APPLE__
-    /* Need to turn off optimizations so weak framework load check works */
-    __attribute__ ((optnone))
-#endif
-static int MODPLUG_Load(void)
-{
-    if (modplug.loaded == 0) {
-#ifdef MODPLUG_DYNAMIC
-        modplug.handle = SDL_LoadObject(MODPLUG_DYNAMIC);
-        if (modplug.handle == NULL) {
-            return -1;
-        }
-#endif
-        FUNCTION_LOADER(ModPlug_Load, ModPlugFile* (*)(const void* data, int size))
-        FUNCTION_LOADER(ModPlug_Unload, void (*)(ModPlugFile* file))
-        FUNCTION_LOADER(ModPlug_Read, int  (*)(ModPlugFile* file, void* buffer, int size))
-        FUNCTION_LOADER(ModPlug_Seek, void (*)(ModPlugFile* file, int millisecond))
-        FUNCTION_LOADER(ModPlug_SeekOrder, void (*)(ModPlugFile* file, int order))
-        FUNCTION_LOADER(ModPlug_GetLength, int (*)(ModPlugFile* file))
-        FUNCTION_LOADER(ModPlug_GetSettings, void (*)(ModPlug_Settings* settings))
-        FUNCTION_LOADER(ModPlug_SetSettings, void (*)(const ModPlug_Settings* settings))
-        FUNCTION_LOADER(ModPlug_SetMasterVolume, void (*)(ModPlugFile* file,unsigned int cvol))
-        FUNCTION_LOADER(ModPlug_GetName, const char* (*)(ModPlugFile* file))
-#ifdef MODPLUG_DYNAMIC
-        modplug.ModPlug_Tell = (int (*)(ModPlugFile* file)) SDL_LoadFunction(modplug.handle, "ModPlug_Tell");
-        if (modplug.ModPlug_Tell == NULL) {
-            SDL_ClearError();   /* ModPlug_Tell is optional. */
-        }
-#elif defined(MODPLUG_HAS_TELL)
-        modplug.ModPlug_Tell = ModPlug_Tell;
-#else
-        modplug.ModPlug_Tell = NULL;
-#endif
-    }
-    ++modplug.loaded;
-
-    return 0;
-}
-
-static void MODPLUG_Unload(void)
-{
-    if (modplug.loaded == 0) {
-        return;
-    }
-    if (modplug.loaded == 1) {
-#ifdef MODPLUG_DYNAMIC
-        SDL_UnloadObject(modplug.handle);
-#endif
-    }
-    --modplug.loaded;
-}
-
-
-typedef struct
-{
-    int volume;
-    int play_count;
-    ModPlugFile *file;
-    SDL_AudioStream *stream;
-    void *buffer;
-    int buffer_size;
-    Mix_MusicMetaTags tags;
-} MODPLUG_Music;
-
-
-static int MODPLUG_Seek(void *context, double position);
-static void MODPLUG_Delete(void *context);
-
-static int MODPLUG_Open(const SDL_AudioSpec *spec)
-{
-    /* ModPlug supports U8 or S16 audio output */
-    modplug.ModPlug_GetSettings(&settings);
-    settings.mFlags = MODPLUG_ENABLE_OVERSAMPLING;
-    if (spec->channels == 1) {
-        settings.mChannels = 1;
-    } else {
-        settings.mChannels = 2;
-    }
-    if (SDL_AUDIO_BITSIZE(spec->format) == 8) {
-        settings.mBits = 8;
-    } else {
-        settings.mBits = 16;
-    }
-    if (spec->freq >= 44100) {
-        

(Patch may be truncated, please check the link at the top of this post.)