diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-09-26 20:07:49 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-09-26 20:07:49 +0000 |
commit | 0fe9b6310013549b509da2311b16c56e0b498d7d (patch) | |
tree | b4299400540a088893011965c7a23dc95d6d7162 /libs/ardour/ladspa_plugin.cc | |
parent | ddda6bc4f52e56983924a6ce4f41db4915972be8 (diff) |
retain controllable info for plugins
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2488 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ladspa_plugin.cc')
-rw-r--r-- | libs/ardour/ladspa_plugin.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index 6d55423e37..6391349ab5 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -348,6 +348,10 @@ LadspaPlugin::get_state() snprintf(buf, sizeof(buf), "%+f", shadow_data[i]); child->add_property("value", string(buf)); root->add_child_nocopy (*child); + + if (i < controls.size() && controls[i]) { + root->add_child_nocopy (controls[i]->get_state()); + } } } @@ -389,6 +393,7 @@ LadspaPlugin::set_state(const XMLNode& node) warning << _("LADSPA: no ladspa port number") << endmsg; continue; } + if ((prop = child->property("value")) != 0) { data = prop->value().c_str(); } else { @@ -399,7 +404,7 @@ LadspaPlugin::set_state(const XMLNode& node) sscanf (port, "%" PRIu32, &port_id); set_parameter (port_id, atof(data)); } - + latency_compute_run (); return 0; |