diff options
author | David Robillard <d@drobilla.net> | 2024-11-15 20:38:43 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-11-24 19:01:17 -0500 |
commit | fb192806333ca88d5acb53b849f268611773230d (patch) | |
tree | 5dc3197e1544a72dd9b64bc805f309c9f816ae05 /src/comm.h | |
parent | e4eaf9b181c121a794f2acaea6e51aeaaf4ecffb (diff) | |
download | jalv-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.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |