aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jalv.c9
-rw-r--r--src/urids.c2
-rw-r--r--src/urids.h2
3 files changed, 7 insertions, 6 deletions
diff --git a/src/jalv.c b/src/jalv.c
index 65a6a34..eb6545a 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -275,11 +275,7 @@ jalv_create_ports(Jalv* jalv)
void
jalv_allocate_port_buffers(Jalv* jalv)
{
- const LV2_URID atom_Chunk = jalv->map.map(
- jalv->map.handle, lilv_node_as_string(jalv->nodes.atom_Chunk));
-
- const LV2_URID atom_Sequence = jalv->map.map(
- jalv->map.handle, lilv_node_as_string(jalv->nodes.atom_Sequence));
+ const JalvURIDs* const urids = &jalv->urids;
for (uint32_t i = 0; i < jalv->num_ports; ++i) {
JalvPort* const port = &jalv->ports[i];
@@ -288,7 +284,8 @@ jalv_allocate_port_buffers(Jalv* jalv)
const size_t size = port->buf_size ? port->buf_size : jalv->midi_buf_size;
- port->evbuf = lv2_evbuf_new(size, atom_Chunk, atom_Sequence);
+ port->evbuf =
+ lv2_evbuf_new(size, urids->atom_Chunk, urids->atom_Sequence);
lilv_instance_connect_port(
jalv->instance, i, lv2_evbuf_get_buffer(port->evbuf));
diff --git a/src/urids.c b/src/urids.c
index 7ca033b..022ab66 100644
--- a/src/urids.c
+++ b/src/urids.c
@@ -19,10 +19,12 @@ jalv_init_urids(Symap* const symap, JalvURIDs* const urids)
{
#define MAP_URI(uri) symap_map(symap, (uri))
+ urids->atom_Chunk = MAP_URI(LV2_ATOM__Chunk);
urids->atom_Float = MAP_URI(LV2_ATOM__Float);
urids->atom_Int = MAP_URI(LV2_ATOM__Int);
urids->atom_Object = MAP_URI(LV2_ATOM__Object);
urids->atom_Path = MAP_URI(LV2_ATOM__Path);
+ urids->atom_Sequence = MAP_URI(LV2_ATOM__Sequence);
urids->atom_String = MAP_URI(LV2_ATOM__String);
urids->atom_eventTransfer = MAP_URI(LV2_ATOM__eventTransfer);
urids->bufsz_maxBlockLength = MAP_URI(LV2_BUF_SIZE__maxBlockLength);
diff --git a/src/urids.h b/src/urids.h
index bf8d7ad..ee00d66 100644
--- a/src/urids.h
+++ b/src/urids.h
@@ -12,10 +12,12 @@
JALV_BEGIN_DECLS
typedef struct {
+ LV2_URID atom_Chunk;
LV2_URID atom_Float;
LV2_URID atom_Int;
LV2_URID atom_Object;
LV2_URID atom_Path;
+ LV2_URID atom_Sequence;
LV2_URID atom_String;
LV2_URID atom_eventTransfer;
LV2_URID bufsz_maxBlockLength;