warn if non-realtime settings are set

This commit is contained in:
derselbst 2018-07-01 06:56:22 +02:00
parent 16a112956e
commit 3ffa6a318e

View file

@ -283,15 +283,15 @@ static const fluid_cmd_t fluid_commands[] =
/* settings commands */
{
"set", "settings", fluid_handle_set,
"set name value Set the value of a controller or settings"
"set name value Set the value of a setting (must be a real-time setting to take effect immediately)"
},
{
"get", "settings", fluid_handle_get,
"get name Get the value of a controller or settings"
"get name Get the value of a setting"
},
{
"info", "settings", fluid_handle_info,
"info name Get information about a controller or settings"
"info name Get information about a setting"
},
{
"settings", "settings", fluid_handle_settings,
@ -1877,6 +1877,11 @@ fluid_handle_set(void *data, int ac, char **av, fluid_ostream_t out)
fluid_ostream_printf(out, "set: Value out of range.\n");
}
if(!fluid_settings_is_realtime(handler->synth->settings, av[0]))
{
fluid_ostream_printf(out, "Warning: '%s' is not a realtime setting, changes won't take effect.\n", av[0]);
}
return ret;
}