summaryrefslogtreecommitdiff
path: root/libs/ardour/ladspa_plugin.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-07-17 08:05:59 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-07-17 08:05:59 -0400
commit650964f3203319b013c49a286b5fc5fc203f3bbb (patch)
tree60b2f879d4ed634f9420a737886086db5eb31f78 /libs/ardour/ladspa_plugin.cc
parent9cbe231b920d92a2e44e08962a3ed6870b962f34 (diff)
parent780397d0ccf8df54eeb78c88eebbaab0c2745029 (diff)
Merge branch 'master' into windows
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;
}