aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2015-06-22 11:47:09 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2015-06-22 11:47:09 +0200
commit0c102b7d3980cb40c1be3ef858ca6b7f847a7718 (patch)
treed6ea5a3461a5a3779d5250f5b4991ad61ae4e7a9
parenta6ebcc7d66fc542ef4b1f3a21879bfb24e8a4f3e (diff)
downloadsynthpod-0c102b7d3980cb40c1be3ef858ca6b7f847a7718.tar.xz
add conditional monitoring of std ports.
* add conditional monitoring of std port * control * audio * cv
-rw-r--r--data/modlist.edc16
-rw-r--r--lib/synthpod_app.c111
-rw-r--r--lib/synthpod_private.h31
-rw-r--r--lib/synthpod_ui.c134
4 files changed, 248 insertions, 44 deletions
diff --git a/data/modlist.edc b/data/modlist.edc
index 146fd998..e9b1c229 100644
--- a/data/modlist.edc
+++ b/data/modlist.edc
@@ -258,6 +258,22 @@ group {
fixed: 1 1;
align: 1.0 0.5;
aspect: 1.0 1.0;
+ rel1.relative: -1 0;
+ rel1.to_x: "elm.swallow.end";
+ rel2.relative: 0 1;
+ rel2.to_x: "elm.swallow.end";
+ min: 16 16;
+ }
+ }
+ part {
+ name: "elm.swallow.end";
+ type: SWALLOW;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ align: 1.0 0.5;
+ aspect: 1.0 1.0;
rel1.relative: 1 0;
rel2.relative: 1 1;
min: 16 16;
diff --git a/lib/synthpod_app.c b/lib/synthpod_app.c
index b7319a85..c627bbf3 100644
--- a/lib/synthpod_app.c
+++ b/lib/synthpod_app.c
@@ -123,6 +123,7 @@ struct _mod_t {
struct _port_t {
mod_t *mod;
int selected;
+ int monitored;
const LilvPort *tar;
uint32_t index;
@@ -554,18 +555,21 @@ _sp_app_mod_add(sp_app_t *app, const char *uri)
tar->size = app->driver->max_block_size * sizeof(float);
tar->type = PORT_TYPE_AUDIO;
tar->selected = 1;
+ tar->monitored = 1;
}
else if(lilv_port_is_a(plug, port, app->regs.port.cv.node))
{
tar->size = app->driver->max_block_size * sizeof(float);
tar->type = PORT_TYPE_CV;
tar->selected = 1;
+ tar->monitored = 1;
}
else if(lilv_port_is_a(plug, port, app->regs.port.control.node))
{
tar->size = sizeof(float);
tar->type = PORT_TYPE_CONTROL;
tar->selected = 0;
+ tar->monitored = 1;
LilvNode *dflt_node;
LilvNode *min_node;
@@ -582,6 +586,8 @@ _sp_app_mod_add(sp_app_t *app, const char *uri)
{
tar->size = app->driver->seq_size;
tar->type = PORT_TYPE_ATOM;
+ tar->selected = 0;
+ tar->monitored = 0;
tar->buffer_type = PORT_BUFFER_TYPE_SEQUENCE;
//tar->buffer_type = lilv_port_is_a(plug, port, app->regs.port.sequence.node)
// ? PORT_BUFFER_TYPE_SEQUENCE
@@ -594,14 +600,17 @@ _sp_app_mod_add(sp_app_t *app, const char *uri)
// check whether this is a control port
LilvNode *control_designation = lilv_new_uri(app->world, LV2_CORE__control);
- const LilvPort *control_port = lilv_plugin_get_port_by_designation(plug,
- tar->direction == PORT_DIRECTION_INPUT
- ? app->regs.port.input.node
- : app->regs.port.output.node
- , control_designation);
-
- tar->selected = control_port == port; // only select control ports by default
- lilv_node_free(control_designation);
+ if(control_designation)
+ {
+ const LilvPort *control_port = lilv_plugin_get_port_by_designation(plug,
+ tar->direction == PORT_DIRECTION_INPUT
+ ? app->regs.port.input.node
+ : app->regs.port.output.node
+ , control_designation);
+
+ tar->selected = control_port == port; // only select control ports by default
+ lilv_node_free(control_designation);
+ }
}
else
; //TODO
@@ -609,8 +618,10 @@ _sp_app_mod_add(sp_app_t *app, const char *uri)
// get minimum port size if specified
LilvNode *minsize = lilv_port_get(plug, port, app->regs.port.minimum_size.node);
if(minsize)
+ {
tar->size = lilv_node_as_int(minsize);
- lilv_node_free(minsize);
+ lilv_node_free(minsize);
+ }
// allocate 8-byte aligned buffer
#if defined(_WIN32)
@@ -619,12 +630,13 @@ _sp_app_mod_add(sp_app_t *app, const char *uri)
posix_memalign(&tar->buf, 8, tar->size); //FIXME check
mlock(tar->buf, tar->size);
#endif
- //TODO mlock
memset(tar->buf, 0x0, tar->size);
// initialize control buffers to default value
if(tar->type == PORT_TYPE_CONTROL)
*(float *)tar->buf = tar->dflt;
+ else
+ memset(tar->buf, 0x0, tar->size); // clear audio/cv/atom buffers
// set port buffer
lilv_instance_connect_port(mod->inst, i, tar->buf);
@@ -1264,6 +1276,37 @@ sp_app_from_ui(sp_app_t *app, const LV2_Atom *atom)
break;
}
}
+ else if(protocol == app->regs.synthpod.port_monitored.urid)
+ {
+ const transmit_port_monitored_t *monitor = (const transmit_port_monitored_t *)atom;
+
+ port_t *port = _sp_app_port_get(app, monitor->uid.body, monitor->port.body);
+ if(!port)
+ return;
+
+ switch(monitor->state.body)
+ {
+ case -1: // query
+ {
+ // signal ui
+ size_t size = sizeof(transmit_port_monitored_t);
+ transmit_port_monitored_t *trans = _sp_app_to_ui_request(app, size);
+ if(trans)
+ {
+ _sp_transmit_port_monitored_fill(&app->regs, &app->forge, trans, size,
+ port->mod->uid, port->index, port->monitored);
+ _sp_app_to_ui_advance(app, size);
+ }
+ break;
+ }
+ case 0: // unmonitor
+ port->monitored = 0;
+ break;
+ case 1: // monitor
+ port->monitored = 1;
+ break;
+ }
+ }
else if(protocol == app->regs.synthpod.bundle_load.urid)
{
const transmit_bundle_load_t *load = (const transmit_bundle_load_t *)atom;
@@ -2424,6 +2467,7 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
cJSON *port_symbol_json = cJSON_CreateString(
lilv_node_as_string(lilv_port_get_symbol(mod->plug, port->tar)));
cJSON *port_selected_json = cJSON_CreateBool(port->selected);
+ cJSON *port_monitored_json = cJSON_CreateBool(port->monitored);
cJSON *port_sources_json = cJSON_CreateArray();
for(int j=0; j<port->num_sources; j++)
{
@@ -2441,6 +2485,7 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
}
cJSON_AddItemToObject(port_json, "symbol", port_symbol_json);
cJSON_AddItemToObject(port_json, "selected", port_selected_json);
+ cJSON_AddItemToObject(port_json, "monitored", port_monitored_json);
cJSON_AddItemToObject(port_json, "sources", port_sources_json);
cJSON_AddItemToArray(mod_ports_json, port_json);
}
@@ -2586,8 +2631,13 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
mod_json;
mod_json = mod_json->next)
{
- const char *mod_uri_str = cJSON_GetObjectItem(mod_json, "uri")->valuestring;
- u_id_t mod_uid = cJSON_GetObjectItem(mod_json, "uid")->valueint;
+ const cJSON *mod_uri_json = cJSON_GetObjectItem(mod_json, "uri");
+ const cJSON *mod_uid_json = cJSON_GetObjectItem(mod_json, "uid");
+ if(!mod_uri_json || !mod_uid_json)
+ continue;
+
+ const char *mod_uri_str = mod_uri_json->valuestring;
+ u_id_t mod_uid = mod_uid_json->valueint;
mod_t *mod = _sp_app_mod_add(app, mod_uri_str);
if(!mod)
@@ -2602,7 +2652,10 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
app->mods[app->num_mods] = mod;
app->num_mods += 1;
- mod->selected = cJSON_GetObjectItem(mod_json, "selected")->type == cJSON_True;
+ const cJSON *mod_selected_json = cJSON_GetObjectItem(mod_json, "selected");
+ mod->selected = mod_selected_json
+ ? mod_selected_json->type == cJSON_True
+ : 0;
mod->uid = mod_uid;
if(mod->uid > app->uid)
@@ -2641,7 +2694,11 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
mod_json;
mod_json = mod_json->next)
{
- u_id_t mod_uid = cJSON_GetObjectItem(mod_json, "uid")->valueint;
+ const cJSON *mod_uid_json = cJSON_GetObjectItem(mod_json, "uid");
+ if(!mod_uid_json)
+ continue;
+
+ u_id_t mod_uid = mod_uid_json->valueint;
mod_t *mod = _sp_app_mod_get(app, mod_uid);
if(!mod)
@@ -2652,25 +2709,43 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
port_json;
port_json = port_json->next)
{
- const char *port_symbol_str = cJSON_GetObjectItem(port_json, "symbol")->valuestring;
+ const cJSON *port_symbol_json = cJSON_GetObjectItem(port_json, "symbol");
+ if(!port_symbol_json)
+ continue;
+
+ const char *port_symbol_str = port_symbol_json->valuestring;
for(int i=0; i<mod->num_ports; i++)
{
port_t *port = &mod->ports[i];
const LilvNode *port_symbol_node = lilv_port_get_symbol(mod->plug, port->tar);
+ if(!port_symbol_node)
+ continue;
// search for matching port symbol
if(strcmp(port_symbol_str, lilv_node_as_string(port_symbol_node)))
continue;
- port->selected = cJSON_GetObjectItem(port_json, "selected")->type == cJSON_True;
+ const cJSON *port_selected_json = cJSON_GetObjectItem(port_json, "selected");
+ port->selected = port_selected_json
+ ? port_selected_json->type == cJSON_True
+ : 0;
+ const cJSON *port_monitored_json = cJSON_GetObjectItem(port_json, "monitored");
+ port->monitored = port_monitored_json
+ ? port_monitored_json->type == cJSON_True
+ : 1;
for(cJSON *source_json = cJSON_GetObjectItem(port_json, "sources")->child;
source_json;
source_json = source_json->next)
{
- uint32_t source_uid = cJSON_GetObjectItem(source_json, "uid")->valueint;
- const char *source_symbol_str = cJSON_GetObjectItem(source_json, "symbol")->valuestring;
+ const cJSON *source_uid_json = cJSON_GetObjectItem(source_json, "uid");
+ const cJSON *source_symbol_json = cJSON_GetObjectItem(source_json, "symbol");
+ if(!source_uid_json || !source_symbol_json)
+ continue;
+
+ uint32_t source_uid = source_uid_json->valueint;
+ const char *source_symbol_str = source_symbol_json->valuestring;
mod_t *source = _sp_app_mod_get(app, source_uid);
if(!source)
diff --git a/lib/synthpod_private.h b/lib/synthpod_private.h
index 19de5d64..16f111c2 100644
--- a/lib/synthpod_private.h
+++ b/lib/synthpod_private.h
@@ -226,6 +226,7 @@ struct _reg_t {
reg_item_t port_refresh;
reg_item_t port_connected;
reg_item_t port_subscribed;
+ reg_item_t port_monitored;
reg_item_t port_selected;
reg_item_t bundle_load;
reg_item_t bundle_save;
@@ -352,6 +353,7 @@ sp_regs_init(reg_t *regs, LilvWorld *world, LV2_URID_Map *map)
_register(&regs->synthpod.port_refresh, world, map, SYNTHPOD_PREFIX"portRefresh");
_register(&regs->synthpod.port_connected, world, map, SYNTHPOD_PREFIX"portConnect");
_register(&regs->synthpod.port_subscribed, world, map, SYNTHPOD_PREFIX"portSubscribe");
+ _register(&regs->synthpod.port_monitored, world, map, SYNTHPOD_PREFIX"portMonitor");
_register(&regs->synthpod.port_selected, world, map, SYNTHPOD_PREFIX"portSelect");
_register(&regs->synthpod.bundle_load, world, map, SYNTHPOD_PREFIX"bundleLoad");
_register(&regs->synthpod.bundle_save, world, map, SYNTHPOD_PREFIX"bundleSave");
@@ -463,6 +465,7 @@ sp_regs_deinit(reg_t *regs)
_unregister(&regs->synthpod.port_refresh);
_unregister(&regs->synthpod.port_connected);
_unregister(&regs->synthpod.port_subscribed);
+ _unregister(&regs->synthpod.port_monitored);
_unregister(&regs->synthpod.port_selected);
_unregister(&regs->synthpod.bundle_load);
_unregister(&regs->synthpod.bundle_save);
@@ -481,6 +484,7 @@ typedef struct _transmit_module_preset_save_t transmit_module_preset_save_t;
typedef struct _transmit_module_selected_t transmit_module_selected_t;
typedef struct _transmit_port_connected_t transmit_port_connected_t;
typedef struct _transmit_port_subscribed_t transmit_port_subscribed_t;
+typedef struct _transmit_port_monitored_t transmit_port_monitored_t;
typedef struct _transmit_port_refresh_t transmit_port_refresh_t;
typedef struct _transmit_port_selected_t transmit_port_selected_t;
typedef struct _transmit_bundle_load_t transmit_bundle_load_t;
@@ -553,6 +557,13 @@ struct _transmit_port_subscribed_t {
LV2_Atom_Int state _ATOM_ALIGNED;
} _ATOM_ALIGNED;
+struct _transmit_port_monitored_t {
+ transmit_t transmit _ATOM_ALIGNED;
+ LV2_Atom_Int uid _ATOM_ALIGNED;
+ LV2_Atom_Int port _ATOM_ALIGNED;
+ LV2_Atom_Int state _ATOM_ALIGNED;
+} _ATOM_ALIGNED;
+
struct _transmit_port_refresh_t {
transmit_t transmit _ATOM_ALIGNED;
LV2_Atom_Int uid _ATOM_ALIGNED;
@@ -821,6 +832,26 @@ _sp_transmit_port_subscribed_fill(reg_t *regs, LV2_Atom_Forge *forge,
}
static inline void
+_sp_transmit_port_monitored_fill(reg_t *regs, LV2_Atom_Forge *forge,
+ transmit_port_monitored_t *trans, uint32_t size,
+ u_id_t module_uid, uint32_t port_index, int32_t state)
+{
+ _sp_transmit_fill(regs, forge, &trans->transmit, size, regs->synthpod.port_monitored.urid);
+
+ trans->uid.atom.size = sizeof(int32_t);
+ trans->uid.atom.type = forge->Int;
+ trans->uid.body = module_uid;
+
+ trans->port.atom.size = sizeof(int32_t);
+ trans->port.atom.type = forge->Int;
+ trans->port.body = port_index;
+
+ trans->state.atom.size = sizeof(int32_t);
+ trans->state.atom.type = forge->Int;
+ trans->state.body = state; // -1 (query), 0 (not monitored), 1 (monitored)
+}
+
+static inline void
_sp_transmit_port_refresh_fill(reg_t *regs, LV2_Atom_Forge *forge,
transmit_port_refresh_t *trans, uint32_t size,
u_id_t module_uid, uint32_t port_index)
diff --git a/lib/synthpod_ui.c b/lib/synthpod_ui.c
index d930a2dd..45744184 100644
--- a/lib/synthpod_ui.c
+++ b/lib/synthpod_ui.c
@@ -232,6 +232,7 @@ struct _port_t {
struct {
Evas_Object *widget;
+ int monitored;
} std;
};
@@ -539,6 +540,7 @@ _ui_mod_selected_request(mod_t *mod)
{
sp_ui_t *ui = mod->ui;
+ // request module selected state
size_t size = sizeof(transmit_module_selected_t);
transmit_module_selected_t *trans = _sp_ui_to_app_request(ui, size);
if(trans)
@@ -551,12 +553,26 @@ _ui_mod_selected_request(mod_t *mod)
{
port_t *port = &mod->ports[i];
- size_t size = sizeof(transmit_port_selected_t);
- transmit_port_selected_t *trans = _sp_ui_to_app_request(ui, size);
- if(trans)
+ // request port selected state
{
- _sp_transmit_port_selected_fill(&ui->regs, &ui->forge, trans, size, mod->uid, port->index, -1);
- _sp_ui_to_app_advance(ui, size);
+ size_t size = sizeof(transmit_port_selected_t);
+ transmit_port_selected_t *trans = _sp_ui_to_app_request(ui, size);
+ if(trans)
+ {
+ _sp_transmit_port_selected_fill(&ui->regs, &ui->forge, trans, size, mod->uid, port->index, -1);
+ _sp_ui_to_app_advance(ui, size);
+ }
+ }
+
+ // request port monitored state
+ {
+ size_t size = sizeof(transmit_port_monitored_t);
+ transmit_port_monitored_t *trans = _sp_ui_to_app_request(ui, size);
+ if(trans)
+ {
+ _sp_transmit_port_monitored_fill(&ui->regs, &ui->forge, trans, size, mod->uid, port->index, -1);
+ _sp_ui_to_app_advance(ui, size);
+ }
}
}
}
@@ -2606,7 +2622,7 @@ _modlist_toggle_clicked(void *data, Evas_Object *obj, void *event_info)
}
static void
-_modlist_check_changed(void *data, Evas_Object *obj, void *event_info)
+_modlist_selected_changed(void *data, Evas_Object *obj, void *event_info)
{
mod_t *mod = data;
sp_ui_t *ui = mod->ui;
@@ -2657,7 +2673,7 @@ _modlist_content_get(void *data, Evas_Object *obj, const char *part)
if(check)
{
elm_check_state_set(check, mod->selected);
- evas_object_smart_callback_add(check, "changed", _modlist_check_changed, mod);
+ evas_object_smart_callback_add(check, "changed", _modlist_selected_changed, mod);
evas_object_show(check);
elm_layout_icon_set(lay, check);
elm_layout_content_set(lay, "elm.swallow.icon", check);
@@ -2981,7 +2997,7 @@ _group_del(void *data, Evas_Object *obj)
}
static void
-_patched_changed(void *data, Evas_Object *obj, void *event)
+_selected_changed(void *data, Evas_Object *obj, void *event)
{
port_t *port = data;
mod_t *mod = port->mod;
@@ -3000,6 +3016,40 @@ _patched_changed(void *data, Evas_Object *obj, void *event)
}
static void
+_monitored_changed(void *data, Evas_Object *obj, void *event)
+{
+ port_t *port = data;
+ mod_t *mod = port->mod;
+ sp_ui_t *ui = mod->ui;
+
+ port->std.monitored = elm_check_state_get(obj);
+
+ // subsribe or unsubscribe, depending on monitored state
+ {
+ int32_t i = port->index;
+ int32_t state = port->std.monitored;
+
+ if(port->type == PORT_TYPE_CONTROL)
+ _port_subscription_set(mod, i, ui->regs.port.float_protocol.urid, state);
+ else if(port->type == PORT_TYPE_AUDIO)
+ _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, state);
+ else if(port->type == PORT_TYPE_CV)
+ _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, state);
+ }
+
+ // signal monitored state to app
+ {
+ size_t size = sizeof(transmit_port_monitored_t);
+ transmit_port_monitored_t *trans = _sp_ui_to_app_request(ui, size);
+ if(trans)
+ {
+ _sp_transmit_port_monitored_fill(&ui->regs, &ui->forge, trans, size, mod->uid, port->index, port->std.monitored);
+ _sp_ui_to_app_advance(ui, size);
+ }
+ }
+}
+
+static void
_check_changed(void *data, Evas_Object *obj, void *event)
{
port_t *port = data;
@@ -3102,13 +3152,16 @@ _modlist_std_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
port->std.widget = NULL;
// unsubscribe from port
- const uint32_t i = port->index;
- if(port->type == PORT_TYPE_CONTROL)
- _port_subscription_set(mod, i, ui->regs.port.float_protocol.urid, 0);
- else if(port->type == PORT_TYPE_AUDIO)
- _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, 0);
- else if(port->type == PORT_TYPE_CV)
- _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, 0);
+ if(port->std.monitored)
+ {
+ const uint32_t i = port->index;
+ if(port->type == PORT_TYPE_CONTROL)
+ _port_subscription_set(mod, i, ui->regs.port.float_protocol.urid, 0);
+ else if(port->type == PORT_TYPE_AUDIO)
+ _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, 0);
+ else if(port->type == PORT_TYPE_CV)
+ _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, 0);
+ }
}
static Evas_Object *
@@ -3137,11 +3190,21 @@ _modlist_std_content_get(void *data, Evas_Object *obj, const char *part)
Evas_Object *patched = elm_check_add(lay);
if(patched)
{
- evas_object_smart_callback_add(patched, "changed", _patched_changed, port);
+ elm_check_state_set(patched, port->selected ? EINA_TRUE : EINA_FALSE);
+ evas_object_smart_callback_add(patched, "changed", _selected_changed, port);
evas_object_show(patched);
elm_layout_content_set(lay, "elm.swallow.icon", patched);
} // patched
+ Evas_Object *monitored = elm_check_add(lay);
+ if(monitored && (port->type != PORT_TYPE_ATOM) )
+ {
+ elm_check_state_set(monitored, port->std.monitored ? EINA_TRUE : EINA_FALSE);
+ evas_object_smart_callback_add(monitored, "changed", _monitored_changed, port);
+ evas_object_show(monitored);
+ elm_layout_content_set(lay, "elm.swallow.end", monitored);
+ } // monitored
+
Evas_Object *dir = edje_object_add(evas_object_evas_get(lay));
if(dir)
{
@@ -3264,17 +3327,18 @@ _modlist_std_content_get(void *data, Evas_Object *obj, const char *part)
elm_layout_content_set(lay, "elm.swallow.content", child);
}
- if(port->selected)
- elm_check_state_set(patched, EINA_TRUE);
+ if(port->std.monitored)
+ {
- // subscribe to port
- const uint32_t i = port->index;
- if(port->type == PORT_TYPE_CONTROL)
- _port_subscription_set(mod, i, ui->regs.port.float_protocol.urid, 1);
- else if(port->type == PORT_TYPE_AUDIO)
- _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, 1);
- else if(port->type == PORT_TYPE_CV)
- _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, 1);
+ // subscribe to port
+ const uint32_t i = port->index;
+ if(port->type == PORT_TYPE_CONTROL)
+ _port_subscription_set(mod, i, ui->regs.port.float_protocol.urid, 1);
+ else if(port->type == PORT_TYPE_AUDIO)
+ _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, 1);
+ else if(port->type == PORT_TYPE_CV)
+ _port_subscription_set(mod, i, ui->regs.port.peak_protocol.urid, 1);
+ }
port->std.widget = child;
} // lay
@@ -4403,6 +4467,7 @@ sp_ui_from_app(sp_ui_t *ui, const LV2_Atom *atom)
{
port->selected = trans->state.body;
+ // FIXME update port itm
mod_t *mod = _sp_ui_mod_get(ui, trans->uid.body);
if(mod && mod->std.itm)
elm_genlist_item_update(mod->std.itm);
@@ -4410,6 +4475,23 @@ sp_ui_from_app(sp_ui_t *ui, const LV2_Atom *atom)
_patches_update(ui);
}
}
+ else if(protocol == ui->regs.synthpod.port_monitored.urid)
+ {
+ const transmit_port_monitored_t *trans = (const transmit_port_monitored_t *)atom;
+ port_t *port = _sp_ui_port_get(ui, trans->uid.body, trans->port.body);
+ if(!port)
+ return;
+
+ if(port->std.monitored != trans->state.body)
+ {
+ port->std.monitored = trans->state.body;
+
+ // FIXME update port itm
+ mod_t *mod = _sp_ui_mod_get(ui, trans->uid.body);
+ if(mod && mod->std.itm)
+ elm_genlist_item_update(mod->std.itm);
+ }
+ }
else if(protocol == ui->regs.synthpod.module_list.urid)
{
if(ui->modlist)