summaryrefslogtreecommitdiff
path: root/libs/ardour/ladspa_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ladspa_plugin.cc')
-rw-r--r--libs/ardour/ladspa_plugin.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc
index 6ee810f6b1..82bf97264f 100644
--- a/libs/ardour/ladspa_plugin.cc
+++ b/libs/ardour/ladspa_plugin.cc
@@ -40,6 +40,7 @@
#include "pbd/compose.h"
#include "pbd/error.h"
#include "pbd/xml++.h"
+#include "pbd/stacktrace.h"
#include "midi++/manager.h"
@@ -372,6 +373,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;
@@ -379,6 +381,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()) {
@@ -386,6 +389,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) {
@@ -408,6 +413,7 @@ LadspaPlugin::set_state (const XMLNode& node, int version)
sscanf (port, "%" PRIu32, &port_id);
set_parameter (port_id, atof(data));
}
+#endif
latency_compute_run ();
@@ -417,6 +423,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;
@@ -424,6 +431,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()) {
@@ -431,6 +439,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){
@@ -455,6 +464,7 @@ LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */)
}
latency_compute_run ();
+#endif
return 0;
}