From be2a8ef955c2091a2639d4fc93dbc978615733a6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 19 Jun 2011 23:43:48 +0000 Subject: Send control output port updates to UIs (commonly used for metering). git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3407 a436a847-0d15-0410-975c-d299462d15a1 --- src/jalv_internal.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/jalv_internal.h') diff --git a/src/jalv_internal.h b/src/jalv_internal.h index 5ee7755..950d1b7 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -32,16 +32,23 @@ extern "C" { #endif +#define JALV_UI_UPDATE_HZ 15 + typedef struct { LilvWorld* world; /**< Lilv World */ Symap* symap; /**< Symbol (URI) map */ jack_client_t* jack_client; /**< Jack client */ - jack_ringbuffer_t* events; /**< Control change events */ + jack_ringbuffer_t* ui_events; /**< Port events from UI */ + jack_ringbuffer_t* plugin_events; /**< Port events from plugin */ sem_t* done; /**< Exit semaphore */ const LilvPlugin* plugin; /**< Plugin class (RDF data) */ + const LilvUI* ui; /**< Plugin UI (RDF data) */ LilvInstance* instance; /**< Plugin instance (shared library) */ - uint32_t num_ports; /**< Size of the two following arrays: */ + SuilInstance* ui_instance; /**< Plugin UI instance (shared library) */ struct Port* ports; /**< Port array of size num_ports */ + uint32_t num_ports; /**< Size of the two following arrays: */ + jack_nframes_t sample_rate; /**< Sample rate */ + jack_nframes_t event_delta_t; /**< Frames since last update sent to UI */ LilvNode* input_class; /**< Input port class (URI) */ LilvNode* output_class; /**< Output port class (URI) */ LilvNode* control_class; /**< Control port class (URI) */ @@ -62,6 +69,9 @@ int jalv_open_ui(Jalv* jalv, SuilInstance* instance); +bool +jalv_emit_ui_events(Jalv* jalv); + #ifdef __cplusplus } // extern "C" -- cgit v1.2.1