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 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;
}