diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-15 22:23:16 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-15 22:23:16 -0400 |
commit | 9cb678ebcc2ca0c7993bdd182c9e6ad1f8adf09a (patch) | |
tree | 9a98d4e9bceb8845a759c79007c983af4fc420c7 /libs/ardour/ladspa_plugin.cc | |
parent | 90f5eb4a31bebeb315d4c36f20b1aefe110657d0 (diff) |
finally get to the bottom of where NO_PLUGIN_STATE needs to be in order to be useful
Diffstat (limited to 'libs/ardour/ladspa_plugin.cc')
-rw-r--r-- | libs/ardour/ladspa_plugin.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index cebff59771..1ab00e0b34 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -34,6 +34,7 @@ #include "pbd/compose.h" #include "pbd/error.h" #include "pbd/xml++.h" +#include "pbd/stacktrace.h" #include "midi++/manager.h" @@ -360,6 +361,7 @@ LadspaPlugin::set_state (const XMLNode& node, int version) return set_state_2X (node, version); } +#ifndef NO_PLUGIN_STATE XMLNodeList nodes; XMLProperty *prop; XMLNodeConstIterator iter; @@ -367,6 +369,7 @@ LadspaPlugin::set_state (const XMLNode& node, int version) const char *port; const char *data; uint32_t port_id; +#endif LocaleGuard lg (X_("POSIX")); if (node.name() != state_node_name()) { @@ -374,6 +377,8 @@ LadspaPlugin::set_state (const XMLNode& node, int version) return -1; } +#ifndef NO_PLUGIN_STATE + nodes = node.children ("Port"); for (iter = nodes.begin(); iter != nodes.end(); ++iter) { @@ -396,6 +401,7 @@ LadspaPlugin::set_state (const XMLNode& node, int version) sscanf (port, "%" PRIu32, &port_id); set_parameter (port_id, atof(data)); } +#endif latency_compute_run (); @@ -405,6 +411,7 @@ LadspaPlugin::set_state (const XMLNode& node, int version) int LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */) { +#ifndef NO_PLUGIN_STATE XMLNodeList nodes; XMLProperty *prop; XMLNodeConstIterator iter; @@ -412,6 +419,7 @@ LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */) const char *port; const char *data; uint32_t port_id; +#endif LocaleGuard lg (X_("POSIX")); if (node.name() != state_node_name()) { @@ -419,6 +427,7 @@ LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */) return -1; } +#ifndef NO_PLUGIN_STATE nodes = node.children ("port"); for(iter = nodes.begin(); iter != nodes.end(); ++iter){ @@ -443,6 +452,7 @@ LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */) } latency_compute_run (); +#endif return 0; } |