[LV2] Storing binary data chunks without duplication
Robin Gareus
robin at gareus.org
Thu May 9 09:52:17 PDT 2019
Hi Stefan,
I can't offer a solution, but perhaps a hint:
On 5/9/19 5:37 PM, Stefan Westerfeld wrote:
> Ardour stores a new copy of each instrument chunk each time the user saves the session
When lv2_state_equal() matches the previously saved state, Ardour does
not save the state.
The problem however is that the plugin is asked to save state
lilv_state_new_from_instance()
this is compared: lv2_state_equal() and only on mismatch saved:
lilv_state_save().
I guess the problem in your case is that new_from_instance() already
triggers saving the big external blob?
> Is there a way to save large custom binary data chunks into the
> session without duplicating data on each save?
How about:
- save the samples only once and treat them as external files that
don't change (much like external sample-banks): use map_path, not
make_path.
- save the meta-data as LV2_ATOM__Chunk. As long as it doesn't change,
no new state will be saved.
ciao,
robin
-------------- 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/20190509/75e3513b/attachment.sig>
More information about the Devel
mailing list