aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2019-08-01 11:37:51 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2019-08-01 11:37:51 +0200
commitdd64b3779b75a1bcffea5558b8ed74c2cbbf9e32 (patch)
tree84661dafb7d31ca0b159b6dfbdfcd5dadae381dc
parent550c91803e18de6ba8ce3c48b5ce67d33d6f4d15 (diff)
downloadsynthpod-dd64b3779b75a1bcffea5558b8ed74c2cbbf9e32.tar.xz
idisp: trigger first render immediatley after init.
-rw-r--r--VERSION2
-rw-r--r--app/synthpod_app_mod.c5
-rw-r--r--app/synthpod_app_ui.c5
3 files changed, 5 insertions, 7 deletions
diff --git a/VERSION b/VERSION
index 7bccbd17..5a28f2c1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.6073
+0.1.6075
diff --git a/app/synthpod_app_mod.c b/app/synthpod_app_mod.c
index 93d04c69..6e44e0db 100644
--- a/app/synthpod_app_mod.c
+++ b/app/synthpod_app_mod.c
@@ -568,9 +568,9 @@ _sp_app_mod_queue_draw(mod_t *mod)
if(mod->idisp.iface && mod->idisp.subscribed)
{
- if(mod->idisp.counter >= mod->idisp.threshold)
+ while(mod->idisp.counter >= mod->idisp.threshold)
{
- mod->idisp.counter = 0;
+ mod->idisp.counter -= mod->idisp.threshold;
atomic_store(&mod->idisp.draw_queued, true);
sem_post(&mod_worker->sem);
@@ -625,6 +625,7 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn)
atomic_init(&mod->idisp.draw_queued, false);
mod->idisp.lock = (atomic_flag)ATOMIC_FLAG_INIT;
mod->idisp.threshold = app->driver->sample_rate / app->driver->update_rate;
+ mod->idisp.counter = mod->idisp.threshold; // triggers first render immediately
// populate options
mod->opts.options[0].context = LV2_OPTIONS_INSTANCE;
diff --git a/app/synthpod_app_ui.c b/app/synthpod_app_ui.c
index 26461279..ccd11121 100644
--- a/app/synthpod_app_ui.c
+++ b/app/synthpod_app_ui.c
@@ -929,10 +929,7 @@ _sp_app_from_ui_patch_set(sp_app_t *app, const LV2_Atom *atom)
{
mod->idisp.subscribed = ((const LV2_Atom_Bool *)value)->body;
- if(mod->idisp.iface && mod->idisp.subscribed)
- {
- _sp_app_mod_queue_draw(mod); // trigger update
- }
+ _sp_app_mod_queue_draw(mod); // trigger update
}
else if( (prop == app->regs.synthpod.module_reinstantiate.urid)
&& (value->type == app->forge.Bool) )