check for new return values of fluid_settings_*()

This commit is contained in:
derselbst 2017-09-20 20:13:18 +02:00
parent 7bf280cf77
commit 3c99490a60

View file

@ -562,17 +562,17 @@ new_fluid_synth(fluid_settings_t *settings)
if (fluid_synth_initialized == 0) if (fluid_synth_initialized == 0)
{ {
char buf[64]; char buf[64];
if (fluid_settings_str_equal (settings, "synth.volenv", "compliant") == 1) if (fluid_settings_str_equal (settings, "synth.volenv", "compliant") == FLUID_OK)
{ {
fluid_conversion_set_atten_power(FLUID_ATTEN_POWER_DEFAULT_COMPLIANT); fluid_conversion_set_atten_power(FLUID_ATTEN_POWER_DEFAULT_COMPLIANT);
} }
else if (fluid_settings_str_equal (settings, "synth.volenv", "emu") == 1) else if (fluid_settings_str_equal (settings, "synth.volenv", "emu") == FLUID_OK)
{ {
fluid_conversion_set_atten_power(FLUID_ATTEN_POWER_DEFAULT_EMU); fluid_conversion_set_atten_power(FLUID_ATTEN_POWER_DEFAULT_EMU);
} }
else else
{ {
if (fluid_settings_copystr(settings, "synth.volenv", buf, sizeof(buf)/sizeof(buf[0])) == 1) if (fluid_settings_copystr(settings, "synth.volenv", buf, sizeof(buf)/sizeof(buf[0])) == FLUID_OK)
{ {
double atten = atof(buf); double atten = atof(buf);
if(atten != 0.0) if(atten != 0.0)