From 0adab4c4d8dc0b81494f9be882fc8e5ccd65f3d4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 6 Nov 2011 18:57:21 +0000 Subject: Fix compilation against latest LV2 svn. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3599 a436a847-0d15-0410-975c-d299462d15a1 --- src/jalv.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/jalv.c') diff --git a/src/jalv.c b/src/jalv.c index 5eef658..a53409b 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -33,6 +33,7 @@ #endif #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" +#include "lv2/lv2plug.in/ns/ext/urid/urid.h" #ifdef HAVE_LV2_UI_RESIZE # include "lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.h" #endif @@ -53,6 +54,20 @@ typedef struct { float value; } ControlChange; +LV2_URID +map_uri(LV2_URID_Mapper_Handle handle, + const char* uri) +{ + return symap_map(((Jalv*)handle)->symap, uri); +} + +const char* +unmap_uri(LV2_URID_Unmapper_Handle handle, + LV2_URID urid) +{ + return symap_unmap(((Jalv*)handle)->symap, urid); +} + /** Map function for URI map extension. */ @@ -69,6 +84,10 @@ uri_to_id(LV2_URI_Map_Callback_Data callback_data, static LV2_URI_Map_Feature uri_map = { NULL, &uri_to_id }; static const LV2_Feature uri_map_feature = { NS_EXT "uri-map", &uri_map }; +static LV2_URID_Mapper mapper = { NULL, &map_uri }; +static const LV2_Feature mapper_feature = { NS_EXT "urid#Mapper", &mapper }; +static LV2_URID_Unmapper unmapper = { NULL, &unmap_uri }; +static const LV2_Feature unmapper_feature = { NS_EXT "urid#Unmapper", &unmapper }; static LV2_Feature instance_feature = { NS_EXT "instance-access", NULL }; #ifdef HAVE_LV2_UI_RESIZE -- cgit v1.2.1