[linux-audio-dev] LADSPA extension - Formal proposal.

Steve Harris S.W.Harris at ecs.soton.ac.uk
Tue Mar 9 22:48:38 UTC 2004


On Tue, Mar 09, 2004 at 09:52:58 +0100, Fons Adriaensen wrote:
> /* This hint must be used only together with LADSPA_HINT_INTEGER. 
>    It indicates that the port corresponds to a multiway switch selecting
>    between options that have no natural numerical value. A port using this
>    option would typically correspond to a switch statement in the plugin
>    code, and can be represented in a GUI by a menu, a set of radio buttons,
>    or any '1 out of N' selection widget.
>    For each option a label string is provided in the PortNames array (see
>    below). These strings come after all port names. They must be listed
>    in order of the ports using this hint bit, and for each port in order
>    of the numerical value that represents the switch option. The number of
>    options and strings is equal to MAX - MIN + 1, where MIN and MAX are
>    the values of the LowerBound and UpperBound fields in the PortRangeHint
>    struct for the port. These values must be integers. */
> #define LADSPA_HINT_SWITCHED        0x400

I'm still thinking over the implications of this, but an immediate
technical comment:

this would require some rewording of the LADSPA_HINT_INTEGER paragraph (I
think this might be an improvement anyway), currently it says:
"Any bounds set should be slightly wider than the actual integer range
required to avoid floating point rounding errors. For instance, the
integer set {0,1,2,3} might be described as [-0.1, 3.1]"

I think its easier on host to change it to recommend (or require) that
INTEGER bounds should be integers and plugins should accept values with
some tollerance, eg. rounding to the nearest integer value, and this would
be required to make LADSPA_HINT_SWITCHED usable as stated.

- Steve



More information about the Linux-audio-dev mailing list