summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/LV2Plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/LV2Plugin.cpp')
-rw-r--r--src/libs/engine/LV2Plugin.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/libs/engine/LV2Plugin.cpp b/src/libs/engine/LV2Plugin.cpp
index 871050e4..53d317b4 100644
--- a/src/libs/engine/LV2Plugin.cpp
+++ b/src/libs/engine/LV2Plugin.cpp
@@ -47,9 +47,8 @@ LV2Plugin::symbol() const
const string
LV2Plugin::name() const
{
- SLV2Value name = slv2_plugin_get_name(_slv2_plugin);
- if (name)
- return slv2_value_as_string(name);
+ if (_name)
+ return slv2_value_as_string(_name);
else
return "(no name)";
}
@@ -70,9 +69,21 @@ LV2Plugin::instantiate(const string& name,
delete n;
n = NULL;
}
+
+
return n;
}
+
+
+void
+LV2Plugin::slv2_plugin(SLV2Plugin p)
+{
+ _slv2_plugin = p;
+ if (_name)
+ slv2_value_free(_name);
+ _name = slv2_plugin_get_name(_slv2_plugin);
+}
} // namespace Ingen