foxygit / doom Log in
commit 7ac991e876b95c8d9ba742d5e2d6b06faa1df4e4
Author:     Michael Day <contact@michaelcday.com>
AuthorDate: Sat Mar 11 14:38:22 2023 -0500
Commit:     Michael Day <contact@michaelcday.com>
CommitDate: Sat Mar 11 14:38:22 2023 -0500

    Remove special handling of SDL_Mixer FluidSynth
---
 src/i_sdlmusic.c | 49 -------------------------------------------------
 1 file changed, 49 deletions(-)

diff --git a/src/i_sdlmusic.c b/src/i_sdlmusic.c
index b4cdc3dc..c9cafadb 100644
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -180,8 +180,6 @@ static boolean SDLIsInitialized(void)
 // Initialize music subsystem
 static boolean I_SDL_InitMusic(void)
 {
-    boolean fluidsynth_sf_is_set = false;
-
     // If SDL_mixer is not initialized, we have to initialize it
     // and have the responsibility to shut it down later on.

@@ -210,24 +208,6 @@ static boolean I_SDL_InitMusic(void)
         }
     }

-    // When using FluidSynth, proceed to set the soundfont path via
-    // Mix_SetSoundFonts if necessary. We need to do this before calling
-    // Mix_Init() in order for FluidSynth to be registered as a valid decoder
-    // in the Mix_GetMusicDecoder() list.
-
-    if ((strlen(fluidsynth_sf_path) > 0) && (strlen(timidity_cfg_path) == 0))
-    {
-        if (M_FileExists(fluidsynth_sf_path))
-        {
-            Mix_SetSoundFonts(fluidsynth_sf_path);
-        }
-        else
-        {
-            fprintf(stderr,
-                    "I_SDL_InitMusic: Can't find FluidSynth soundfont.\n");
-        }
-    }
-
     // Initialize SDL_Mixer for MIDI music playback
     Mix_Init(MIX_INIT_MID);

@@ -236,35 +216,6 @@ static boolean I_SDL_InitMusic(void)

     RemoveTimidityConfig();

-    // If a soundfont has been set (either here on in the environment),
-    // confirm that FluidSynth is actually available before trying to use it.
-    if ((Mix_GetSoundFonts() != NULL) && (strlen(timidity_cfg_path) == 0))
-    {
-        int total;
-
-        total = Mix_GetNumMusicDecoders();
-
-        // If FluidSynth is present and has a valid soundfont, it will be in
-        // the list of available music decoders.
-        for (int i = 0; i < total; ++i)
-        {
-            if (!strcmp(Mix_GetMusicDecoder(i), "FLUIDSYNTH"))
-            {
-                fluidsynth_sf_is_set = true;
-                break;
-            }
-        }
-
-        if (fluidsynth_sf_is_set)
-        {
-            printf("I_SDL_InitMusic: Using FluidSynth.\n");
-        }
-        else
-        {
-            fprintf(stderr, "I_SDL_InitMusic: FluidSynth unavailable.\n");
-        }
-    }
-
     // If snd_musiccmd is set, we need to call Mix_SetMusicCMD to
     // configure an external music playback program.