aboutsummaryrefslogtreecommitdiff
path: root/props.lv2
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2020-10-02 13:51:33 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2020-10-02 13:51:33 +0200
commit3d82ddcc3e2887c7515ba1b35e1da4713a3eb3d7 (patch)
tree2d7e45752593c6405450aa10fe065090864050ba /props.lv2
parent0fcc0b409a4cd107413dcbdf9c4b3c937c040f1b (diff)
parent49c9cff381f72904ba3ce9b96e32a09a26c58365 (diff)
downloadmonitors.lv2-3d82ddcc3e2887c7515ba1b35e1da4713a3eb3d7.tar.xz
Merge commit '49c9cff381f72904ba3ce9b96e32a09a26c58365' into master
Diffstat (limited to 'props.lv2')
-rw-r--r--props.lv2/.gitlab-ci.yml3
-rw-r--r--props.lv2/VERSION2
-rw-r--r--props.lv2/props.h23
-rw-r--r--props.lv2/test/props.ttl2
-rw-r--r--props.lv2/test/props_test.c6
5 files changed, 32 insertions, 4 deletions
diff --git a/props.lv2/.gitlab-ci.yml b/props.lv2/.gitlab-ci.yml
index c027e92..dd2bcb6 100644
--- a/props.lv2/.gitlab-ci.yml
+++ b/props.lv2/.gitlab-ci.yml
@@ -52,6 +52,9 @@ i686-linux-gnu:
arm-linux-gnueabihf:
<<: *arm_linux_definition
+aarch64-linux-gnu:
+ <<: *arm_linux_definition
+
x86_64-w64-mingw32:
<<: *universal_w64_definition
diff --git a/props.lv2/VERSION b/props.lv2/VERSION
index 66c0104..eac5392 100644
--- a/props.lv2/VERSION
+++ b/props.lv2/VERSION
@@ -1 +1 @@
-0.1.131
+0.1.139
diff --git a/props.lv2/props.h b/props.lv2/props.h
index 06fec13..1d1cb64 100644
--- a/props.lv2/props.h
+++ b/props.lv2/props.h
@@ -111,6 +111,8 @@ struct _props_t {
LV2_URID atom_vector;
LV2_URID atom_object;
LV2_URID atom_sequence;
+
+ LV2_URID state_StateChanged;
} urid;
void *data;
@@ -319,6 +321,13 @@ _props_patch_set(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
if(ref)
lv2_atom_forge_pop(forge, &obj_frame);
+ if(ref)
+ ref = lv2_atom_forge_frame_time(forge, frames);
+ if(ref)
+ ref = lv2_atom_forge_object(forge, &obj_frame, 0, props->urid.state_StateChanged);
+ if(ref)
+ lv2_atom_forge_pop(forge, &obj_frame);
+
return ref;
}
@@ -575,6 +584,8 @@ props_init(props_t *props, const char *subject,
props->urid.atom_object = map->map(map->handle, LV2_ATOM__Object);
props->urid.atom_sequence = map->map(map->handle, LV2_ATOM__Sequence);
+ props->urid.state_StateChanged = map->map(map->handle, LV2_STATE__StateChanged);
+
atomic_init(&props->restoring, false);
int status = 1;
@@ -729,11 +740,15 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
}
props_impl_t *impl = _props_impl_get(props, property->body);
- if(impl && (impl->access == props->urid.patch_writable) )
+ if(impl)
{
_props_impl_set(props, impl, value->type, value->size,
LV2_ATOM_BODY_CONST(value));
+ // send on (e.g. to UI)
+ if(*ref && !impl->def->hidden)
+ *ref = _props_patch_set(props, forge, frames, impl, sequence_num);
+
const props_def_t *def = impl->def;
if(def->event_cb)
def->event_cb(props->data, frames, impl);
@@ -795,11 +810,15 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
const LV2_Atom *value = &prop->value;
props_impl_t *impl = _props_impl_get(props, property);
- if(impl && (impl->access == props->urid.patch_writable) )
+ if(impl)
{
_props_impl_set(props, impl, value->type, value->size,
LV2_ATOM_BODY_CONST(value));
+ // send on (e.g. to UI)
+ if(*ref && !impl->def->hidden)
+ *ref = _props_patch_set(props, forge, frames, impl, sequence_num);
+
const props_def_t *def = impl->def;
if(def->event_cb)
def->event_cb(props->data, frames, impl);
diff --git a/props.lv2/test/props.ttl b/props.lv2/test/props.ttl
index 0ce45d6..cd4d107 100644
--- a/props.lv2/test/props.ttl
+++ b/props.lv2/test/props.ttl
@@ -147,6 +147,6 @@ props:test
props:statInt 4 ;
props:statFloat "0.4"^^xsd:float ;
props:statString "Hello world" ;
- props:statPath <props.ttl> ;
+ props:statPath <> ;
props:statChunk "AQIDBAUGBw=="^^xsd:base64Binary ;
] .
diff --git a/props.lv2/test/props_test.c b/props.lv2/test/props_test.c
index f028e32..69f3b3f 100644
--- a/props.lv2/test/props_test.c
+++ b/props.lv2/test/props_test.c
@@ -552,6 +552,12 @@ _test_2(handle_t *handle)
const LV2_Atom_Object *obj = (const LV2_Atom_Object *)atom;
assert(obj->body.id == 0);
+
+ if(obj->body.otype == props->urid.state_StateChanged)
+ {
+ continue;
+ }
+
assert(obj->body.otype == props->urid.patch_set);
unsigned nprops = 0;