summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/audio_unit.cc5
-rw-r--r--libs/ardour/ladspa_plugin.cc11
-rw-r--r--libs/ardour/luaproc.cc4
-rw-r--r--libs/ardour/lv2_plugin.cc7
-rw-r--r--libs/ardour/lxvst_plugin.cc5
-rw-r--r--libs/ardour/mac_vst_plugin.cc4
-rw-r--r--libs/ardour/plugin.cc29
-rw-r--r--libs/ardour/plugin_insert.cc2
-rw-r--r--libs/ardour/vst_plugin.cc3
-rw-r--r--libs/ardour/windows_vst_plugin.cc4
10 files changed, 10 insertions, 64 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index a1afd5ecee..cf268a0403 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -2061,7 +2061,6 @@ AUPlugin::set_state(const XMLNode& node, int version)
return -1;
}
-#ifndef NO_PLUGIN_STATE
if (node.children().empty()) {
return -1;
}
@@ -2097,7 +2096,6 @@ AUPlugin::set_state(const XMLNode& node, int version)
}
CFRelease (propertyList);
}
-#endif
Plugin::set_state (node, version);
return ret;
@@ -2593,7 +2591,7 @@ AUPluginInfo::get_presets (bool user_only) const
{
std::vector<Plugin::PresetRecord> p;
boost::shared_ptr<CAComponent> comp;
-#ifndef NO_PLUGIN_STATE
+
try {
comp = boost::shared_ptr<CAComponent>(new CAComponent(*descriptor));
if (!comp->IsValid()) {
@@ -2664,7 +2662,6 @@ AUPluginInfo::get_presets (bool user_only) const
CFRelease (presets);
unit->Uninitialize ();
-#endif // NO_PLUGIN_STATE
return p;
}
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc
index bcd0937513..e1f43b54a1 100644
--- a/libs/ardour/ladspa_plugin.cc
+++ b/libs/ardour/ladspa_plugin.cc
@@ -375,19 +375,15 @@ LadspaPlugin::set_state (const XMLNode& node, int version)
return set_state_2X (node, version);
}
-#ifndef NO_PLUGIN_STATE
XMLNodeList nodes;
XMLNodeConstIterator iter;
XMLNode *child;
-#endif
if (node.name() != state_node_name()) {
error << _("Bad node sent to LadspaPlugin::set_state") << endmsg;
return -1;
}
-#ifndef NO_PLUGIN_STATE
-
nodes = node.children ("Port");
for (iter = nodes.begin(); iter != nodes.end(); ++iter) {
@@ -409,7 +405,6 @@ LadspaPlugin::set_state (const XMLNode& node, int version)
set_parameter (port_id, value);
}
-#endif
latency_compute_run ();
@@ -419,7 +414,6 @@ 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 const * prop;
XMLNodeConstIterator iter;
@@ -427,7 +421,6 @@ LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */)
const char *port;
const char *data;
uint32_t port_id;
-#endif
LocaleGuard lg;
if (node.name() != state_node_name()) {
@@ -435,7 +428,6 @@ 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){
@@ -460,7 +452,6 @@ LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */)
}
latency_compute_run ();
-#endif
return 0;
}
@@ -721,7 +712,7 @@ std::vector<Plugin::PresetRecord>
LadspaPluginInfo::get_presets (bool /*user_only*/) const
{
std::vector<Plugin::PresetRecord> p;
-#if (defined HAVE_LRDF && !defined NO_PLUGIN_STATE)
+#ifdef HAVE_LRDF
if (!isdigit (unique_id[0])) {
return p;
}
diff --git a/libs/ardour/luaproc.cc b/libs/ardour/luaproc.cc
index 59409e097e..64c7ca6c7c 100644
--- a/libs/ardour/luaproc.cc
+++ b/libs/ardour/luaproc.cc
@@ -848,11 +848,9 @@ LuaProc::set_script_from_state (const XMLNode& node)
int
LuaProc::set_state (const XMLNode& node, int version)
{
-#ifndef NO_PLUGIN_STATE
XMLNodeList nodes;
XMLNodeConstIterator iter;
XMLNode *child;
-#endif
if (_script.empty ()) {
if (set_script_from_state (node)) {
@@ -860,7 +858,6 @@ LuaProc::set_state (const XMLNode& node, int version)
}
}
-#ifndef NO_PLUGIN_STATE
if (node.name() != state_node_name()) {
error << _("Bad node sent to LuaProc::set_state") << endmsg;
return -1;
@@ -885,7 +882,6 @@ LuaProc::set_state (const XMLNode& node, int version)
set_parameter (port_id, value);
}
-#endif
return Plugin::set_state (node, version);
}
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index fca7bbcf13..5da1895d61 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2128,8 +2128,6 @@ LV2Plugin::set_state(const XMLNode& node, int version)
return -1;
}
-#ifndef NO_PLUGIN_STATE
-
if (version < 3000) {
nodes = node.children("port");
} else {
@@ -2210,7 +2208,6 @@ LV2Plugin::set_state(const XMLNode& node, int version)
if (_session.loading ()) {
latency_compute_run();
}
-#endif
return Plugin::set_state(node, version);
}
@@ -3425,7 +3422,7 @@ std::vector<Plugin::PresetRecord>
LV2PluginInfo::get_presets (bool /*user_only*/) const
{
std::vector<Plugin::PresetRecord> p;
-#ifndef NO_PLUGIN_STATE
+
const LilvPlugin* lp = NULL;
try {
PluginPtr plugin;
@@ -3468,7 +3465,7 @@ LV2PluginInfo::get_presets (bool /*user_only*/) const
lilv_node_free(rdfs_label);
lilv_node_free(pset_Preset);
lilv_node_free(lv2_appliesTo);
-#endif
+
return p;
}
diff --git a/libs/ardour/lxvst_plugin.cc b/libs/ardour/lxvst_plugin.cc
index 78afc55c23..432bff37c2 100644
--- a/libs/ardour/lxvst_plugin.cc
+++ b/libs/ardour/lxvst_plugin.cc
@@ -108,7 +108,7 @@ std::vector<Plugin::PresetRecord>
LXVSTPluginInfo::get_presets (bool user_only) const
{
std::vector<Plugin::PresetRecord> p;
-#ifndef NO_PLUGIN_STATE
+
if (!Config->get_use_lxvst()) {
return p;
}
@@ -163,9 +163,8 @@ LXVSTPluginInfo::get_presets (bool user_only) const
}
}
}
- delete t;
-#endif
+ delete t;
return p;
}
diff --git a/libs/ardour/mac_vst_plugin.cc b/libs/ardour/mac_vst_plugin.cc
index c62b76af5a..9057f324b1 100644
--- a/libs/ardour/mac_vst_plugin.cc
+++ b/libs/ardour/mac_vst_plugin.cc
@@ -113,7 +113,7 @@ std::vector<Plugin::PresetRecord>
MacVSTPluginInfo::get_presets (bool user_only) const
{
std::vector<Plugin::PresetRecord> p;
-#ifndef NO_PLUGIN_STATE
+
if (!Config->get_use_macvst ()) {
return p;
}
@@ -169,8 +169,6 @@ MacVSTPluginInfo::get_presets (bool user_only) const
}
}
delete t;
-#endif
-
return p;
}
diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc
index 970959cd85..4bb983ee82 100644
--- a/libs/ardour/plugin.cc
+++ b/libs/ardour/plugin.cc
@@ -80,11 +80,6 @@ using namespace PBD;
namespace ARDOUR { class AudioEngine; }
-#ifdef NO_PLUGIN_STATE
-static bool seen_get_state_message = false;
-static bool seen_set_state_message = false;
-#endif
-
PBD::Signal2<void, std::string, Plugin*> Plugin::PresetsChanged;
bool
@@ -321,12 +316,11 @@ Plugin::possible_output () const
const Plugin::PresetRecord *
Plugin::preset_by_label (const string& label)
{
-#ifndef NO_PLUGIN_STATE
if (!_have_presets) {
find_presets ();
_have_presets = true;
}
-#endif
+
// FIXME: O(n)
for (map<string, PresetRecord>::const_iterator i = _presets.begin(); i != _presets.end(); ++i) {
if (i->second.label == label) {
@@ -340,12 +334,11 @@ Plugin::preset_by_label (const string& label)
const Plugin::PresetRecord *
Plugin::preset_by_uri (const string& uri)
{
-#ifndef NO_PLUGIN_STATE
if (!_have_presets) {
find_presets ();
_have_presets = true;
}
-#endif
+
map<string, PresetRecord>::const_iterator pr = _presets.find (uri);
if (pr != _presets.end()) {
return &pr->second;
@@ -425,7 +418,6 @@ Plugin::get_presets ()
{
vector<PresetRecord> p;
-#ifndef NO_PLUGIN_STATE
if (!_have_presets) {
find_presets ();
_have_presets = true;
@@ -434,14 +426,6 @@ Plugin::get_presets ()
for (map<string, PresetRecord>::const_iterator i = _presets.begin(); i != _presets.end(); ++i) {
p.push_back (i->second);
}
-#else
- if (!seen_set_state_message) {
- info << string_compose (_("Plugin presets are not supported in this build of %1. Consider paying for a full version"),
- PROGRAM_NAME)
- << endmsg;
- seen_set_state_message = true;
- }
-#endif
return p;
}
@@ -511,16 +495,7 @@ Plugin::get_state ()
root->set_property (X_("last-preset-label"), _last_preset.label);
root->set_property (X_("parameter-changed-since-last-preset"), _parameter_changed_since_last_preset);
-#ifndef NO_PLUGIN_STATE
add_state (root);
-#else
- if (!seen_get_state_message) {
- info << string_compose (_("Saving plugin settings is not supported in this build of %1. Consider paying for the full version"),
- PROGRAM_NAME)
- << endmsg;
- seen_get_state_message = true;
- }
-#endif
return *root;
}
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index edb48e7813..5ced715cd4 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -2507,7 +2507,6 @@ PluginInsert::set_control_ids (const XMLNode& node, int version)
/* this may create the new controllable */
boost::shared_ptr<Evoral::Control> c = control (Evoral::Parameter (PluginAutomation, 0, p));
-#ifndef NO_PLUGIN_STATE
if (!c) {
continue;
}
@@ -2515,7 +2514,6 @@ PluginInsert::set_control_ids (const XMLNode& node, int version)
if (ac) {
ac->set_state (**iter, version);
}
-#endif
}
}
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc
index f1f69ebc8f..ebce493d4c 100644
--- a/libs/ardour/vst_plugin.cc
+++ b/libs/ardour/vst_plugin.cc
@@ -314,8 +314,6 @@ VSTPlugin::set_state (const XMLNode& node, int version)
{
LocaleGuard lg;
int ret = -1;
-
-#ifndef NO_PLUGIN_STATE
XMLNode* child;
if ((child = find_named_node (node, X_("chunk"))) != 0) {
@@ -353,7 +351,6 @@ VSTPlugin::set_state (const XMLNode& node, int version)
ret = 0;
}
-#endif
Plugin::set_state (node, version);
return ret;
diff --git a/libs/ardour/windows_vst_plugin.cc b/libs/ardour/windows_vst_plugin.cc
index dfef082be7..3d1e06c72e 100644
--- a/libs/ardour/windows_vst_plugin.cc
+++ b/libs/ardour/windows_vst_plugin.cc
@@ -106,7 +106,7 @@ std::vector<Plugin::PresetRecord>
WindowsVSTPluginInfo::get_presets (bool user_only) const
{
std::vector<Plugin::PresetRecord> p;
-#ifndef NO_PLUGIN_STATE
+
if (!Config->get_use_lxvst()) {
return p;
}
@@ -130,8 +130,6 @@ WindowsVSTPluginInfo::get_presets (bool user_only) const
}
}
delete t;
-#endif
-
return p;
}