Re: [linux-audio-dev] LADSPA 2

From: Lars Luthman <larsl@email-addr-hidden>
Date: Tue Apr 25 2006 - 19:58:18 EEST

On Tue, 2006-04-25 at 17:40 +0100, tom christie wrote:
> A) There is no built-in way of a host distinguishing between a LADSPA
> 1.1 and a LADSPA 2.x plugin. (Unless I'm missing something?)
>
> Would it make sense to change the name of the discovery function?
> eg... ladspa2_descriptor() instead of ladspa_descriptor()

That makes sense to me. You could of course say that all LADSPA2
plugins/bundles/directories should be stored in different directories
from LADSPA1 (e.g. /usr/lib/ladspa2 instead of /usr/lib/ladspa) but
since the user is free to set $LADSPA_PATH to whatever he wants and
hosts are free to search whatever directories they want that wouldn't be
a very stable solution. Having a separate discovery function is a good
idea.

> B) There is no way of a host distinguishing between a LADSPA 2.x and a
> LADSPA 2.y plugin.
>
> Would it make sense for the initial few bytes of the struct to
> explicitly declare that this really is a LADSPA struct and give the
> major and minor versions for which it was written? This would allow
> the struct to change in the future if neccessary without breaking
> things and without needing to change the name of the discovery
> function again.
>
> char ladspa_string[7]; // plugin must set this to "LADSPA\0"
> unsigned short major_version; // plugin must set this to 2
> unsigned short minor_version; // plugin must set this to 0

I don't think that the string is needed - if the host got the descriptor
from a ladspa2_descriptor() discovery function, that should be enough to
be sure that it is a LADSPA2 descriptor. A version number might be good
though - even if the goal is to add extensions without breaking the ABI
it could still be necessary to break it at some point in the future. One
version number should be enough though, and it doesn't have to match the
actual version of the LADSPA spec. Like the DSSI_API_Version in the DSSI
descriptor.

-- 
Lars Luthman
PGP key:     http://www.student.nada.kth.se/~d00-llu/pgp_key.php
Fingerprint: FCA7 C790 19B9 322D EB7A  E1B3 4371 4650 04C7 7E2E

Received on Wed Apr 26 00:15:11 2006

This archive was generated by hypermail 2.1.8 : Wed Apr 26 2006 - 00:15:11 EEST