mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-04 01:51:06 +00:00
allow any double string value for "synth.volenv"
This commit is contained in:
parent
65193c6f94
commit
bc12b61e4a
1 changed files with 9 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue