aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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