From 97b1c331cfb79da58fd2926861d65541f0c6b072 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 22 Aug 2011 17:40:24 +0000 Subject: Improve documentation. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3448 a436a847-0d15-0410-975c-d299462d15a1 --- src/jalv.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/jalv.c b/src/jalv.c index c2cf3b8..9c110f3 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -43,6 +43,9 @@ sem_t exit_sem; /**< Exit semaphore */ #define MIDI_BUFFER_SIZE 1024 +/** + Control change event, sent through ring buffers for UI updates. +*/ typedef struct { uint32_t index; float value; @@ -79,7 +82,9 @@ die(const char* msg) } /** - Create a port structure from data (pre-instantiation/pre-Jack). + Create a port structure from data description. This is called before plugin + and Jack instantiation. The remaining instance-specific setup + (e.g. buffers) is done later in expose_port(). */ void create_port(Jalv* host, @@ -127,6 +132,9 @@ create_port(Jalv* host, host->longest_sym = (sym_len > host->longest_sym) ? sym_len : host->longest_sym; } +/** + Create port structures from data (via create_port()) for all ports. +*/ void jalv_create_ports(Jalv* jalv) { @@ -143,6 +151,12 @@ jalv_create_ports(Jalv* jalv) free(default_values); } +/** + Get a port structure by symbol. + + TODO: Build an index to make this faster, currently O(n) which may be + a problem when restoring the state of plugins with many ports. +*/ struct Port* jalv_port_by_symbol(Jalv* jalv, const char* sym) { -- cgit v1.2.1