allow any double string value for "synth.volenv"

This commit is contained in:
derselbst 2017-09-09 16:00:00 +02:00
parent 65193c6f94
commit bc12b61e4a

View file

@ -564,8 +564,16 @@ new_fluid_synth(fluid_settings_t *settings)
{
if(FLUID_STRCMP(buf, "compliant") == 0)
fluid_conversion_set_atten_power(FLUID_ATTEN_POWER_DEFAULT_COMPLIANT);
else
else if(FLUID_STRCMP(buf, "emu") == 0)
fluid_conversion_set_atten_power(FLUID_ATTEN_POWER_DEFAULT_EMU);
else
{
double atten = atof(buf);
if(atten != 0.0)
fluid_conversion_set_atten_power(atten);
else
fluid_conversion_set_atten_power(FLUID_ATTEN_POWER_DEFAULT_EMU);
}
}
fluid_synth_init();