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

David Robillard d at drobilla.net
Sun Feb 26 14:08:53 PST 2012


On Sun, 2012-02-26 at 14:28 +0100, Stefan Kersten wrote:
[...]
> my use case is an extension that allows realtime-safe instantiation (and
> destruction) of plugins. currently the interface to be provided by the plugin
> via extension_data looks like this:
> 
> typedef struct
> {
>     void (*initialize)(LV2_Descriptor *                   descriptor,
>                        const char *                       bundle_path,
>                        const LV2_Feature *const *         features);
>     void (*release)(LV2_Descriptor *                      descriptor);
> 
>     uint32_t (*instance_size)(const LV2_Descriptor *      descriptor);
>     uint32_t (*instance_alignment)(const LV2_Descriptor * descriptor);
> 
>     LV2_Handle (*instantiate)(const LV2_Descriptor *      descriptor,
>                               void *                      location,
>                               double                      sample_rate);
> } LV2_RT_Instantiate_Interface;
> 
> the main point here is that the host's feature set is required during library
> (or descriptor) initialization, because potentially non-realtime-safe calls
> (e.g. to the urid extension) cannot be made from within instantiate and their
> results need to be cached beforehand.

Wouldn't it be simpler/better to just have the host pass an allocator?

Presumably initialize and release would go away if the new discovery API
was there to use.

-dr





More information about the Devel mailing list