From 77e1a1d289adf7f4fe76d98f51aaac29679606cb Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 5 Mar 2018 12:31:50 +0200 Subject: [PATCH] Replaced usages of fluid_settings_getstr() function This function is deprecated since FluidSynth 1.1.9 and removed in upcoming 2.x --- src/sound/i_musicinterns.h | 1 - src/sound/mididevices/music_fluidsynth_mididevice.cpp | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/sound/i_musicinterns.h b/src/sound/i_musicinterns.h index 2f04a39c1..b4269aaba 100644 --- a/src/sound/i_musicinterns.h +++ b/src/sound/i_musicinterns.h @@ -297,7 +297,6 @@ protected: static TReqProc fluid_settings_setnum; static TReqProc fluid_settings_setstr; static TReqProc fluid_settings_setint; - static TReqProc fluid_settings_getstr; static TReqProc fluid_settings_getint; static TReqProc fluid_synth_set_reverb_on; static TReqProc fluid_synth_set_chorus_on; diff --git a/src/sound/mididevices/music_fluidsynth_mididevice.cpp b/src/sound/mididevices/music_fluidsynth_mididevice.cpp index a00fb01e6..05ed27532 100644 --- a/src/sound/mididevices/music_fluidsynth_mididevice.cpp +++ b/src/sound/mididevices/music_fluidsynth_mididevice.cpp @@ -656,10 +656,9 @@ FString FluidSynthMIDIDevice::GetStats() int polyphony = fluid_synth_get_polyphony(FluidSynth); int voices = fluid_synth_get_active_voice_count(FluidSynth); double load = fluid_synth_get_cpu_load(FluidSynth); - char *chorus, *reverb; - int maxpoly; - fluid_settings_getstr(FluidSettings, "synth.chorus.active", &chorus); - fluid_settings_getstr(FluidSettings, "synth.reverb.active", &reverb); + int chorus, reverb, maxpoly; + fluid_settings_getint(FluidSettings, "synth.chorus.active", &chorus); + fluid_settings_getint(FluidSettings, "synth.reverb.active", &reverb); fluid_settings_getint(FluidSettings, "synth.polyphony", &maxpoly); CritSec.Leave(); @@ -667,7 +666,7 @@ FString FluidSynthMIDIDevice::GetStats() TEXTCOLOR_YELLOW "%6.2f" TEXTCOLOR_NORMAL "%% CPU " "Reverb: " TEXTCOLOR_YELLOW "%3s" TEXTCOLOR_NORMAL " Chorus: " TEXTCOLOR_YELLOW "%3s", - voices, polyphony, maxpoly, load, reverb, chorus); + voices, polyphony, maxpoly, load, reverb ? "yes" : "no", chorus ? "yes" : "no"); return out; } @@ -691,7 +690,6 @@ DYN_FLUID_SYM(delete_fluid_settings); DYN_FLUID_SYM(fluid_settings_setnum); DYN_FLUID_SYM(fluid_settings_setstr); DYN_FLUID_SYM(fluid_settings_setint); -DYN_FLUID_SYM(fluid_settings_getstr); DYN_FLUID_SYM(fluid_settings_getint); DYN_FLUID_SYM(fluid_synth_set_reverb_on); DYN_FLUID_SYM(fluid_synth_set_chorus_on);