aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-24 18:55:34 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-24 18:55:34 +0100
commit63118ea3606f46ddef0b6b824b65174665a2ce05 (patch)
treed211e0dd114c660e26c26ae4fb44b3178530c9b4
parentf6285147455647b0d7ef6b7e82950e9f80d078cf (diff)
downloadsynthpod-63118ea3606f46ddef0b6b824b65174665a2ce05.tar.xz
fix ui:floatProtocol for lv2:CVPort.
-rw-r--r--VERSION2
-rw-r--r--app/synthpod_app_ui.c18
2 files changed, 14 insertions, 6 deletions
diff --git a/VERSION b/VERSION
index ceb3c59e..c2707fb0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.4735
+0.1.4737
diff --git a/app/synthpod_app_ui.c b/app/synthpod_app_ui.c
index fc1a6800..9490b2cb 100644
--- a/app/synthpod_app_ui.c
+++ b/app/synthpod_app_ui.c
@@ -62,11 +62,19 @@ _sp_app_from_ui_float_protocol(sp_app_t *app, const LV2_Atom *atom)
return advance_ui[app->block_state];
// set port value
- void *buf = PORT_BASE_ALIGNED(port);
- *(float *)buf = trans->value.body;
- port->last = trans->value.body;
-
- _sp_app_port_control_stash(port);
+ float *buf = PORT_BASE_ALIGNED(port);
+ if(port->type == PORT_TYPE_CONTROL)
+ {
+ *buf = trans->value.body;
+ port->last = trans->value.body;
+ _sp_app_port_control_stash(port);
+ }
+ else if(port->type == PORT_TYPE_CV)
+ {
+ for(unsigned i = 0; i < app->driver->max_block_size; i++)
+ buf[i] = trans->value.body;
+ port->last = fabs(trans->value.body);
+ }
return advance_ui[app->block_state];
}