From 200832923a1fe10411e48b9e42c3b3b087f683c3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 18 Nov 2011 20:12:29 +0000 Subject: [PATCH] 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 --- libs/ardour/lv2/lv2plug.in/ns/ext/state/state.h | 2 ++ libs/ardour/lv2_plugin_lilv.cc | 6 +++--- 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);