aboutsummaryrefslogtreecommitdiffstats
path: root/src/comm.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-15 20:38:43 -0500
committerDavid Robillard <d@drobilla.net>2024-11-24 19:01:17 -0500
commitfb192806333ca88d5acb53b849f268611773230d (patch)
tree5dc3197e1544a72dd9b64bc805f309c9f816ae05 /src/comm.h
parente4eaf9b181c121a794f2acaea6e51aeaaf4ecffb (diff)
downloadjalv-fb192806333ca88d5acb53b849f268611773230d.tar.gz
jalv-fb192806333ca88d5acb53b849f268611773230d.tar.bz2
jalv-fb192806333ca88d5acb53b849f268611773230d.zip
Fix Jack latency recomputation when plugin latency changes
Paul Davis says "jack_recompute_total_latencies() is a server call. It is not legal to make server calls from within a server callback (like the process callback)."
Diffstat (limited to 'src/comm.h')
-rw-r--r--src/comm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/comm.h b/src/comm.h
index e4579eb..11d7dc3 100644
--- a/src/comm.h
+++ b/src/comm.h
@@ -22,6 +22,7 @@ typedef enum {
NO_MESSAGE, ///< Sentinel type for uninitialized messages
CONTROL_PORT_CHANGE, ///< Value change for a control port (float)
EVENT_TRANSFER, ///< Event transfer for a sequence port (atom)
+ LATENCY_CHANGE, ///< Change to plugin latency
} JalvMessageType;
/**
@@ -59,6 +60,16 @@ typedef struct {
} JalvEventTransfer;
/**
+ The payload of a LATENCY_CHANGE message.
+
+ This message has a fixed sized, and is described in its entirety by this
+ struct.
+*/
+typedef struct {
+ float value; ///< Latency in frames at the current sample rate
+} JalvLatencyChange;
+
+/**
Write a message in two parts to a ring.
This is used to conveniently write a message with a fixed-size header and