Re: [LAD] [RFC] LADSPA 1.2

From: Stefan Kost <ensonic@email-addr-hidden-obscura.de>
Date: Tue Jun 23 2009 - 10:52:02 EEST

Stefano D'Angelo schrieb:
> 2009/6/18 Stefano D'Angelo <zanga.mail@email-addr-hidden>:
>
>> 2009/6/18 Luis Garrido <luisgarrido@email-addr-hidden>
>>
>>> This has been debated already. Several times. For instance, please
>>> follow this (long) thread:
>>>
>>>
>>> http://lists.linuxaudio.org/pipermail/linux-audio-dev/2004-March/006948.html
>>>
>>> While I think that each side of the argument has its merits, in the
>>> end to me it all boils down to: "is lrdf simple and lightweight enough
>>> so it is acceptable to consider it from a practical point of view a
>>> de-facto mandatory extension of ladspa.h for all but the simplest of
>>> hosts and plugins?"
>>>
>>> My personal answer is "mmm... okay, I guess" but I don't think we will
>>> ever reach a global consensus on this.
>>>
>> We have basically five alternatives, I guess:
>>
>> 1. Forget about this;
>> 2. Implement this breaking the ABI (API too?);
>> 3. Do as Fons suggested (which to me sounds like make that tiny part of the
>> API a bit counter-intuitive);
>> 4. Use LRDF;
>> 5. Add something like this to the API:
>>
>> struct {
>> float value;
>> const char *name;
>> } ladspa_port_value_enum;
>>
>> struct ladspa_port_value_enum * ladspa_get_port_value_enums(unsigned long
>> descriptor_index, unsigned long port_index);
>>
>> I'd choose 4 or 5, but in the end I don't really care, whatever is fine with
>> me.
>>
>> Stefano
>>
>
> Oops, I was meaning struct ladspa_port_value_enum **
> ladspa_get_port_value_enums(unsigned long descriptor_index, unsigned
> long port_index);
>
> Returned value is a NULL-terminated array of pointers... well, whatever.
>
> Stefano
>
I like the idea of the function. A nice feature of buzzmachine plugins
is that plugins can have a describe_value() function. It returns a port
value as a string. This is very flexible as plugins can include the unit
values or other characters in the string (e.g. "90°", "4½" or "±0").

a)
For ladspa we could add a
const char *describe_port_value(LADSPA_Handle Instance, unsigned long Port);
to the end of _LADSPA_Descriptor.
For that we would need to add a ladspa_get_api_version() and only access
this for plugins that return >=1.2.

b)
Have a ladspa_descriptor_ext() function that exists only >1.2 and will
include a version in the descriptor.

My point is if we consider adding more public function to the api, it
would be good to version it.

Adding the enum to the end of portname will work, but I see not so much
benefit here to change the semantics of portnames. once a host has some
lrdf support its no so difficult to get more metadata out from it.
 
Stefan
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Tue Jun 23 12:15:02 2009

This archive was generated by hypermail 2.1.8 : Tue Jun 23 2009 - 12:15:02 EEST