aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-16 13:16:39 -0500
committerDavid Robillard <d@drobilla.net>2024-11-24 19:02:31 -0500
commit7e886fda55c827a7d1bcb2082f0dbd48f7887cfa (patch)
tree323e508254be4df4322d5668d917b0018a91ee1e /src/jalv.c
parentae75e363101a249d4da94ab4ca525d32a325a030 (diff)
downloadjalv-7e886fda55c827a7d1bcb2082f0dbd48f7887cfa.tar.gz
jalv-7e886fda55c827a7d1bcb2082f0dbd48f7887cfa.tar.bz2
jalv-7e886fda55c827a7d1bcb2082f0dbd48f7887cfa.zip
Add cached URIDs for atom:Chunk and atom:Sequence
Diffstat (limited to 'src/jalv.c')
-rw-r--r--src/jalv.c9
1 files changed, 3 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));