foxygit / doom Log in
commit 864726e4cb972e96182835488c2679e31b83694e
Author:     Michael Day <contact@michaelcday.com>
AuthorDate: Mon Mar 20 14:26:37 2023 -0400
Commit:     Michael Day <contact@michaelcday.com>
CommitDate: Tue Mar 21 13:59:23 2023 -0400

    if -> ifdef for usage of HAVE_FLUIDSYNTH macro
---
 cmake/config.h.cin | 2 +-
 src/i_flmusic.c    | 2 +-
 src/i_sound.c      | 4 ++--
 src/i_sound.h      | 2 +-
 src/m_config.c     | 2 +-
 src/setup/sound.c  | 8 ++++----
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/cmake/config.h.cin b/cmake/config.h.cin
index 13ea7e8e..6c67239f 100644
--- a/cmake/config.h.cin
+++ b/cmake/config.h.cin
@@ -4,7 +4,7 @@
 #cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
 #cmakedefine PROGRAM_PREFIX "@PROGRAM_PREFIX@"

-#cmakedefine01 HAVE_FLUIDSYNTH
+#cmakedefine HAVE_FLUIDSYNTH
 #cmakedefine HAVE_LIBSAMPLERATE
 #cmakedefine HAVE_LIBPNG
 #cmakedefine HAVE_DIRENT_H
diff --git a/src/i_flmusic.c b/src/i_flmusic.c
index 11095572..d022f9c6 100644
--- a/src/i_flmusic.c
+++ b/src/i_flmusic.c
@@ -17,7 +17,7 @@

 #include "config.h"

-#if HAVE_FLUIDSYNTH
+#ifdef HAVE_FLUIDSYNTH

 #include "fluidsynth.h"

diff --git a/src/i_sound.c b/src/i_sound.c
index 7747997d..1175afc9 100644
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -94,7 +94,7 @@ static music_module_t *music_modules[] =
 #ifdef _WIN32
     &music_win_module,
 #endif
-#if HAVE_FLUIDSYNTH
+#ifdef HAVE_FLUIDSYNTH
     &music_fl_module,
 #endif // HAVE_FLUIDSYNTH
 #ifndef DISABLE_SDL2MIXER
@@ -513,7 +513,7 @@ void I_BindSoundVariables(void)
     M_BindIntVariable("winmm_chorus_level",      &winmm_chorus_level);
 #endif

-#if HAVE_FLUIDSYNTH
+#ifdef HAVE_FLUIDSYNTH
     M_BindIntVariable("fsynth_chorus_active",       &fsynth_chorus_active);
     M_BindFloatVariable("fsynth_chorus_depth",      &fsynth_chorus_depth);
     M_BindFloatVariable("fsynth_chorus_level",      &fsynth_chorus_level);
diff --git a/src/i_sound.h b/src/i_sound.h
index 1c2066d1..e2a4a872 100644
--- a/src/i_sound.h
+++ b/src/i_sound.h
@@ -280,7 +280,7 @@ extern int winmm_chorus_level;

 // For FluidSynth module:

-#if HAVE_FLUIDSYNTH
+#ifdef HAVE_FLUIDSYNTH
 extern char *fsynth_sf_path;
 extern int fsynth_chorus_active;
 extern float fsynth_chorus_depth;
diff --git a/src/m_config.c b/src/m_config.c
index ea7f51ec..ecafdbaa 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -936,7 +936,7 @@ static default_t extra_defaults_list[] =

     CONFIG_VARIABLE_STRING(music_pack_path),

-#if HAVE_FLUIDSYNTH
+#ifdef HAVE_FLUIDSYNTH
     //!
     // If 1, activate the FluidSynth chorus effects module. If 0, no chorus
     // will be added to the output signal.
diff --git a/src/setup/sound.c b/src/setup/sound.c
index e4d11f93..02d5a56f 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -50,7 +50,7 @@ static const char *opltype_strings[] =

 static const char *cfg_extension[] = { "cfg", NULL };

-#if HAVE_FLUIDSYNTH
+#ifdef HAVE_FLUIDSYNTH
 static const char *sf_extension[] = { "sf2", "sf3", NULL };
 #endif

@@ -90,7 +90,7 @@ int winmm_reverb_level = -1;
 int winmm_chorus_level = -1;
 #endif

-#if HAVE_FLUIDSYNTH
+#ifdef HAVE_FLUIDSYNTH
 char *fsynth_sf_path = "";
 int fsynth_chorus_active = 1;
 float fsynth_chorus_depth = 5.0f;
@@ -326,7 +326,7 @@ void ConfigSound(TXT_UNCAST_ARG(widget), void *user_data)
                                     "Select Timidity config file",
                                     cfg_extension),
                 NULL)),
-#if HAVE_FLUIDSYNTH
+#ifdef HAVE_FLUIDSYNTH
         TXT_NewRadioButton("FluidSynth", &snd_musicdevice, SNDDEVICE_FSYNTH),
         TXT_NewConditional(&snd_musicdevice, SNDDEVICE_FSYNTH,
             TXT_MakeTable(2,
@@ -365,7 +365,7 @@ void BindSoundVariables(void)
     M_BindIntVariable("winmm_chorus_level",       &winmm_chorus_level);
 #endif

-#if HAVE_FLUIDSYNTH
+#ifdef HAVE_FLUIDSYNTH
     M_BindIntVariable("fsynth_chorus_active",     &fsynth_chorus_active);
     M_BindFloatVariable("fsynth_chorus_depth",    &fsynth_chorus_depth);
     M_BindFloatVariable("fsynth_chorus_level",    &fsynth_chorus_level);