diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2020-10-02 13:53:50 +0200 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2020-10-02 13:53:50 +0200 |
commit | 9fd0396f54a507290d287e28852f0e6e3c681f0a (patch) | |
tree | e3a7973d262cdb03da30ab7047a68bd7b96c6ece | |
parent | 04b6a4172b2e101fb7c35ed4aa84163745d3d47c (diff) | |
parent | 4b1fac92780ef35ce00f9561c515827f8f4a6764 (diff) | |
download | vm.lv2-9fd0396f54a507290d287e28852f0e6e3c681f0a.tar.xz |
Merge commit '4b1fac92780ef35ce00f9561c515827f8f4a6764' into master
-rw-r--r-- | props.lv2/.gitlab-ci.yml | 3 | ||||
-rw-r--r-- | props.lv2/VERSION | 2 | ||||
-rw-r--r-- | props.lv2/props.h | 23 | ||||
-rw-r--r-- | props.lv2/test/props.ttl | 2 | ||||
-rw-r--r-- | props.lv2/test/props_test.c | 6 |
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; |