aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2019-04-06 22:28:53 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2019-04-06 22:32:37 +0200
commit113c350e26d27a0034579fc9aa05bdf417567c99 (patch)
tree4dbcb88ae7cb89792494c28d16f01282c87b57fd
parent356657c10fb934bb20c0a2ab61a85449f6f53ce5 (diff)
downloadsynthpod-113c350e26d27a0034579fc9aa05bdf417567c99.tar.xz
idisp: disable when canvas:graph parameter preset.
-rw-r--r--VERSION2
-rw-r--r--app/meson.build2
-rw-r--r--app/synthpod_app_mod.c17
-rw-r--r--include/synthpod_private.h9
4 files changed, 26 insertions, 4 deletions
diff --git a/VERSION b/VERSION
index c99ea08..ac3c2fb 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.5927
+0.1.5975
diff --git a/app/meson.build b/app/meson.build
index f3692fd..9b41516 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -6,7 +6,7 @@ srcs = ['synthpod_app.c',
'synthpod_app_worker.c'
]
-incs = [inc_incs, app_incs, xpress_incs, osc_incs, extui_incs, ardour_incs, varchunk_incs, crossclock_incs]
+incs = [inc_incs, app_incs, canvas_incs, xpress_incs, osc_incs, extui_incs, ardour_incs, varchunk_incs, crossclock_incs]
deps = [m_dep, rt_dep, lv2_dep, thread_dep, lilv_dep]
app = static_library('synthpod_app', srcs,
diff --git a/app/synthpod_app_mod.c b/app/synthpod_app_mod.c
index 5c331ed..93d04c6 100644
--- a/app/synthpod_app_mod.c
+++ b/app/synthpod_app_mod.c
@@ -703,8 +703,21 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn)
LV2_WORKER__interface);
mod->opts.iface = lilv_instance_get_extension_data(mod->inst,
LV2_OPTIONS__interface);
- mod->idisp.iface = lilv_instance_get_extension_data(mod->inst,
- LV2_INLINEDISPLAY__interface);
+ const bool has_ro_canvas_graph = lilv_world_ask(app->world,
+ lilv_plugin_get_uri(mod->plug), app->regs.patch.readable.node,
+ app->regs.canvas.graph.node);
+ const bool has_rw_canvas_graph = lilv_world_ask(app->world,
+ lilv_plugin_get_uri(mod->plug), app->regs.patch.writable.node,
+ app->regs.canvas.graph.node);
+ if(has_ro_canvas_graph || has_rw_canvas_graph)
+ {
+ //sp_app_log_note(app, "%s: detected canvas:graph parameter\n", __func__);
+ }
+ else
+ {
+ mod->idisp.iface = lilv_instance_get_extension_data(mod->inst,
+ LV2_INLINEDISPLAY__interface);
+ }
mod->state.iface = lilv_instance_get_extension_data(mod->inst,
LV2_STATE__interface);
mod->system_ports = lilv_plugin_has_feature(plug, app->regs.synthpod.system_ports.node);
diff --git a/include/synthpod_private.h b/include/synthpod_private.h
index 09e803d..7f7744e 100644
--- a/include/synthpod_private.h
+++ b/include/synthpod_private.h
@@ -51,6 +51,7 @@
#include <lv2_extensions.h> // ardour inline display
#include <osc.lv2/osc.h>
+#include <canvas.lv2/canvas.h>
typedef enum _port_type_t port_type_t;
typedef enum _port_atom_type_t port_atom_type_t;
@@ -277,6 +278,10 @@ struct _reg_t {
} xpress;
struct {
+ reg_item_t graph;
+ } canvas;
+
+ struct {
reg_item_t group;
reg_item_t left;
reg_item_t right;
@@ -576,6 +581,8 @@ sp_regs_init(reg_t *regs, LilvWorld *world, LV2_URID_Map *map)
_register(&regs->xpress.message, world, map, "http://open-music-kontrollers.ch/lv2/xpress#Message");
+ _register(&regs->canvas.graph, world, map, CANVAS__graph);
+
_register(&regs->group.group, world, map, LV2_PORT_GROUPS__group);
_register(&regs->group.left, world, map, LV2_PORT_GROUPS__left);
_register(&regs->group.right, world, map, LV2_PORT_GROUPS__right);
@@ -836,6 +843,8 @@ sp_regs_deinit(reg_t *regs)
_unregister(&regs->xpress.message);
+ _unregister(&regs->canvas.graph);
+
_unregister(&regs->group.group);
_unregister(&regs->group.left);
_unregister(&regs->group.right);