aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-06 18:57:21 +0000
committerDavid Robillard <d@drobilla.net>2011-11-06 18:57:21 +0000
commit0adab4c4d8dc0b81494f9be882fc8e5ccd65f3d4 (patch)
treef9554ef81e0f149d41fa0578f21b58879d8fe589
parentc4238232efbf531ae77cd286746d27d0dcbdf060 (diff)
downloadjalv-0adab4c4d8dc0b81494f9be882fc8e5ccd65f3d4.tar.gz
jalv-0adab4c4d8dc0b81494f9be882fc8e5ccd65f3d4.tar.bz2
jalv-0adab4c4d8dc0b81494f9be882fc8e5ccd65f3d4.zip
Fix compilation against latest LV2 svn.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3599 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/jalv.c19
-rw-r--r--src/lv2_evbuf.c6
-rw-r--r--src/symap.h7
3 files changed, 25 insertions, 7 deletions
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
diff --git a/src/lv2_evbuf.c b/src/lv2_evbuf.c
index 7849124..8426297 100644
--- a/src/lv2_evbuf.c
+++ b/src/lv2_evbuf.c
@@ -20,15 +20,15 @@
#include <stdlib.h>
#include <assert.h>
-#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
+#include "lv2/lv2plug.in/ns/ext/atom/atom-buffer.h"
#include "lv2/lv2plug.in/ns/ext/event/event.h"
#include "lv2_evbuf.h"
struct LV2_Evbuf_Impl {
union {
- LV2_Event_Buffer event;
- LV2_Atom_Event_Buffer atom_event;
+ LV2_Event_Buffer event;
+ LV2_Atom_Buffer atom_event;
} buf;
LV2_Evbuf_Type type;
};
diff --git a/src/symap.h b/src/symap.h
index 15a271a..383597a 100644
--- a/src/symap.h
+++ b/src/symap.h
@@ -17,11 +17,10 @@
/**
@file symap.h API for Symap, a basic symbol map (string interner).
- Particularly useful and intended for implementation of the LV2 URI map and
- URI unmap extensions.
+ Particularly useful for implementing LV2 URI mapping.
- @see <a href="http://lv2plug.in/ns/ext/uri-map/">LV2 URI Map</a>
- @see <a href="http://lv2plug.in/ns/ext/uri-unmap/">LV2 URI Unmap</a>
+ @see <a href="http://lv2plug.in/ns/ext/urid">LV2 URID</a>
+ @see <a href="http://lv2plug.in/ns/ext/uri-map">LV2 URI Map</a>
*/
#ifndef SYMAP_H