summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-18 20:12:29 +0000
committerDavid Robillard <d@drobilla.net>2011-11-18 20:12:29 +0000
commit200832923a1fe10411e48b9e42c3b3b087f683c3 (patch)
treeb78dfd4a58fdc928f7cd65eb422f59e01a0a179f /libs
parent000281e4d039436f022d09f989d08babe0d5f2de (diff)
Use LV2_STATE_INTERFACE_URI instead of hard-coded string.
git-svn-id: svn://localhost/ardour2/branches/3.0@10685 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/lv2/lv2plug.in/ns/ext/state/state.h2
-rw-r--r--libs/ardour/lv2_plugin_lilv.cc6
2 files changed, 5 insertions, 3 deletions
diff --git a/libs/ardour/lv2/lv2plug.in/ns/ext/state/state.h b/libs/ardour/lv2/lv2plug.in/ns/ext/state/state.h
index cb6f2fcfd3..4e1c28a3b8 100644
--- a/libs/ardour/lv2/lv2plug.in/ns/ext/state/state.h
+++ b/libs/ardour/lv2/lv2plug.in/ns/ext/state/state.h
@@ -35,6 +35,8 @@ extern "C" {
#define LV2_STATE_URI "http://lv2plug.in/ns/ext/state"
+#define LV2_STATE_INTERFACE_URI LV2_STATE_URI "#Interface"
+
typedef void* LV2_State_Handle;
/**
diff --git a/libs/ardour/lv2_plugin_lilv.cc b/libs/ardour/lv2_plugin_lilv.cc
index 0d2500b607..c0c7507fab 100644
--- a/libs/ardour/lv2_plugin_lilv.cc
+++ b/libs/ardour/lv2_plugin_lilv.cc
@@ -152,7 +152,7 @@ LV2Plugin::init(void* c_plugin, framecnt_t rate)
LilvPlugin* plugin = _impl->plugin;
- LilvNode* state_iface_uri = lilv_new_uri(_world.world, NS_STATE "Interface");
+ LilvNode* state_iface_uri = lilv_new_uri(_world.world, LV2_STATE_INTERFACE_URI);
#ifdef lilv_plugin_has_extension_data
_has_state_interface = lilv_plugin_has_extension_data(plugin, state_iface_uri);
lilv_node_free(state_iface_uri);
@@ -603,7 +603,7 @@ LV2Plugin::add_state(XMLNode* root) const
// Get LV2 State extension data from plugin instance
LV2_State_Interface* state_iface = (LV2_State_Interface*)extension_data(
- "http://lv2plug.in/ns/ext/state#Interface");
+ LV2_STATE_INTERFACE_URI);
if (!state_iface) {
warning << string_compose(
_("Plugin \"%1\% failed to return LV2 state interface"),
@@ -775,7 +775,7 @@ LV2Plugin::set_state(const XMLNode& node, int version)
// Get LV2 State extension data from plugin instance
LV2_State_Interface* state_iface = (LV2_State_Interface*)extension_data(
- "http://lv2plug.in/ns/ext/state#Interface");
+ LV2_STATE_INTERFACE_URI);
if (state_iface) {
cout << "Loading LV2 state from " << state_path << endl;
RDFF file = rdff_open(state_path.c_str(), false);