[LV2] --SPAM--::Re: [Devel] lv2_descriptor() considered harmful

Stefan Kersten sk at k-hornz.de
Mon Feb 27 02:21:36 PST 2012


On 27.02.12 01:01, David Robillard wrote:
[...]
>> the idea is to keep instance creation overhead as low as possible; "placement"
>> instantiation saves one call to the allocator and is possible for many plugins
>> (in my case most of them generated by faust). an allocator feature still makes
>> sense though, for plugins that don't know their memory requirements at compile time.
> 
> Fair enough (though it's just one function call). 

it might be a relatively costly function call and a compact memory layout should
also improve locality of reference.

> What do you need dynamic alignment for?

it's probably not really needed (and not really dynamic), but since the instance
is constructed within a larger block of memory along with some state and
audio/control buffers, the `instance_alignment' function is supposed to return
the required alignment of the structure in order to place it correctly into memory.

>> yes. i've been rolling my own plugin API when i realized that LV2 does almost
>> everything i need and is extensible enough to make it do virtually anything.
>> good work!
> 
> Best to get along with others if at all possible :)

yeah well, at the moment i am abusing LV2 as an internal plugin format for a
specific host, but with the intention to be able to load "standard" LV2 plugins
at some point ;)

<sk>



More information about the Devel mailing list