aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-21 18:13:50 -0500
committerDavid Robillard <d@drobilla.net>2024-11-24 19:11:53 -0500
commit15324bd2bb040f9dc62769b9355bb31b57a9ae0e (patch)
tree1fa0bb4a068f972a2909f3488bd3a40d8a1d95cf /src/jalv.c
parent2a5bc1ca7aee36cd763ac10c894b84eef347fe25 (diff)
downloadjalv-15324bd2bb040f9dc62769b9355bb31b57a9ae0e.tar.gz
jalv-15324bd2bb040f9dc62769b9355bb31b57a9ae0e.tar.bz2
jalv-15324bd2bb040f9dc62769b9355bb31b57a9ae0e.zip
Move process thread setup code to a separate file
Towards more cleanly separating the audio thread code from the rest of the application.
Diffstat (limited to 'src/jalv.c')
-rw-r--r--src/jalv.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/jalv.c b/src/jalv.c
index 818ff82..5dc45d1 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -11,12 +11,12 @@
#include "frontend.h"
#include "jalv_config.h"
#include "log.h"
-#include "lv2_evbuf.h"
#include "macros.h"
#include "mapper.h"
#include "nodes.h"
#include "options.h"
#include "port.h"
+#include "process_setup.h"
#include "query.h"
#include "settings.h"
#include "state.h"
@@ -213,37 +213,6 @@ jalv_create_ports(Jalv* jalv)
return 0;
}
-void
-jalv_allocate_port_buffers(Jalv* jalv)
-{
- const JalvURIDs* const urids = &jalv->urids;
-
- for (uint32_t i = 0; i < jalv->num_ports; ++i) {
- JalvPort* const port = &jalv->ports[i];
- if (port->type == TYPE_EVENT) {
- const size_t size =
- port->buf_size ? port->buf_size : jalv->settings.midi_buf_size;
-
- lv2_evbuf_free(port->evbuf);
- port->evbuf =
- lv2_evbuf_new(size, urids->atom_Chunk, urids->atom_Sequence);
-
- lv2_evbuf_reset(port->evbuf, port->flow == FLOW_INPUT);
- lilv_instance_connect_port(
- jalv->instance, i, lv2_evbuf_get_buffer(port->evbuf));
- }
- }
-}
-
-void
-jalv_free_port_buffers(Jalv* const jalv)
-{
- for (uint32_t i = 0; i < jalv->num_ports; ++i) {
- lv2_evbuf_free(jalv->ports[i].evbuf);
- lilv_instance_connect_port(jalv->instance, i, NULL);
- }
-}
-
/**
Get a port structure by symbol.