Implementations for Plugin-Preset-Load to set automation
This commit is contained in:
@@ -808,6 +808,7 @@ LadspaPlugin::load_preset (PresetRecord r)
|
||||
for (uint32_t i = 0; i < (uint32_t) defs->count; ++i) {
|
||||
if (parameter_is_input (defs->items[i].pid)) {
|
||||
set_parameter(defs->items[i].pid, defs->items[i].value);
|
||||
PresetPortSetValue (defs->items[i].pid, defs->items[i].value); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
lrdf_free_setting_values(defs);
|
||||
|
||||
@@ -1125,7 +1125,10 @@ LuaProc::load_preset (PresetRecord r)
|
||||
assert (index);
|
||||
assert (value);
|
||||
LocaleGuard lg;
|
||||
set_parameter (atoi (index->value().c_str()), atof (value->value().c_str ()));
|
||||
const uint32_t p = atoi (index->value().c_str());
|
||||
const float v = atof (value->value().c_str ());
|
||||
set_parameter (p, v);
|
||||
PresetPortSetValue (p, v); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
return Plugin::load_preset(r);
|
||||
|
||||
@@ -1434,6 +1434,7 @@ set_port_value(const char* port_symbol,
|
||||
const uint32_t port_index = self->port_index(port_symbol);
|
||||
if (port_index != (uint32_t)-1) {
|
||||
self->set_parameter(port_index, *(const float*)value);
|
||||
self->PresetPortSetValue (port_index, *(const float*)value); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -446,8 +446,10 @@ VSTPlugin::load_user_preset (PresetRecord r)
|
||||
|
||||
assert (index);
|
||||
assert (value);
|
||||
|
||||
set_parameter (atoi (index->value().c_str()), atof (value->value().c_str ()));
|
||||
const uint32_t p = atoi (index->value().c_str());
|
||||
const float v = atof (value->value().c_str ());
|
||||
set_parameter (p, v);
|
||||
PresetPortSetValue (p, v); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user