[LV2] LV2_State_Interface.save() and LV2_Atom_Vector

Hanspeter Portner dev at open-music-kontrollers.ch
Sun Oct 25 07:21:06 PDT 2020


On 25.10.20 12:47, Sven Jaehnichen wrote:
> Hi,
> 
> I'm wondering for a wile if it's possible (and if it makes sense) to call the
> state store function with type = LV2_Atom_Vector (or other lv2 container types).
> I haven't tried it yet. And I haven't seen it in others lv2 plugin source code yet.
> 
> How does the store function get to know the vector child size and type data as
> there is no direct way to pass them to the store function. Maybe the value
> pointer has to point to vec.body with vec is a LV2_Atom_Vector (and thus
> pointing child_size instead of the values) ?

yes, just point to the body of the atom/container, will also work with atom
tuples, objects and sequences.

> And does it work?

yes

> For all common LV2 hosts

yes, should work on all hosts that use liblilv (pretty much all hosts do), the
latter handles state save/restore.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.lv2plug.in/pipermail/devel-lv2plug.in/attachments/20201025/18907da4/attachment.sig>


More information about the Devel mailing list