Replaced usages of fluid_settings_getstr() function

This function is deprecated since FluidSynth 1.1.9 and removed in upcoming 2.x
This commit is contained in:
alexey.lysiuk 2018-03-05 12:31:50 +02:00
parent ac47166894
commit 77e1a1d289
2 changed files with 4 additions and 7 deletions

View file

@ -297,7 +297,6 @@ protected:
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, double)> fluid_settings_setnum;
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, const char *)> fluid_settings_setstr;
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, int)> fluid_settings_setint;
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, char **)> fluid_settings_getstr;
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, int *)> fluid_settings_getint;
static TReqProc<FluidSynthModule, void (*)(fluid_synth_t *, int)> fluid_synth_set_reverb_on;
static TReqProc<FluidSynthModule, void (*)(fluid_synth_t *, int)> fluid_synth_set_chorus_on;

View file

@ -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);