From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Is this actually possible?
Date: Thu, 12 Dec 2019 20:09:21 +0100
Date: 2019-12-12T20:09:21+01:00 [thread overview]
Message-ID: <qsu391$k1$1@gioia.aioe.org> (raw)
In-Reply-To: 01eb359c-4898-4e52-8c86-c8c89c55ff75@googlegroups.com
On 2019-12-12 19:30, Lucretia wrote:
> On Thursday, 12 December 2019 18:24:55 UTC, Dmitry A. Kazakov wrote:
>> On 2019-12-12 16:15, Lucretia wrote:
>>> On Thursday, 12 December 2019 15:14:33 UTC, Lucretia wrote:
>>>
>>>
>>>>>>> Why? You must know all variants in order to compute the array element
>>>>>>> size. In Ada you cannot have it either:
>>>>>>
>>>>>> Because it's a binding to a C record: https://github.com/Lucretia/aplug/blob/master/ladspa/src/ladspa.ads#L113
>>>>>
>>>>> I cannot recognize problem there.
>>>>
>>>> That's a predefined struct, it's referenced in the Descriptors below it. It cannot be changed. The API is too cyclic AFAIK to make generics out of it all.
>>>
>>> At the programmer's level, i.e. building a plug-in using the LADSPA API, they define ranges for their ports using that record above. Each port can have different ranges.
>>
>> Can you post the C struct type and where it is used.
>
> In ladspa.h and in exactly the same place as the Ada.
>
> https://www.ladspa.org/ladspa_sdk/ladspa.h.txt
>
> Here is the struct on a gh mirror: https://github.com/adsr/ladspa-sdk/blob/master/src/ladspa.h#L337
>
> and it is used here: https://github.com/adsr/ladspa-sdk/blob/master/src/ladspa.h#L419
Maybe I am dense, but what I see is this:
typedef struct _LADSPA_PortRangeHint {
/* Hints about the port. */
LADSPA_PortRangeHintDescriptor HintDescriptor;
/* Meaningful when hint LADSPA_HINT_BOUNDED_BELOW is active. When
LADSPA_HINT_SAMPLE_RATE is also active then this value should be
multiplied by the relevant sample rate. */
LADSPA_Data LowerBound;
/* Meaningful when hint LADSPA_HINT_BOUNDED_ABOVE is active. When
LADSPA_HINT_SAMPLE_RATE is also active then this value should be
multiplied by the relevant sample rate. */
LADSPA_Data UpperBound;
} LADSPA_PortRangeHint;
and
typedef int LADSPA_PortRangeHintDescriptor;
typedef float LADSPA_Data;
Where is a problem?
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2019-12-12 19:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 16:43 Is this actually possible? Lucretia
2019-12-11 17:38 ` Dmitry A. Kazakov
2019-12-11 17:54 ` Lucretia
2019-12-11 19:55 ` Randy Brukardt
2019-12-11 19:58 ` Dmitry A. Kazakov
2019-12-11 21:12 ` Lucretia
2019-12-11 21:34 ` Dmitry A. Kazakov
2019-12-12 2:00 ` Randy Brukardt
2019-12-12 9:26 ` Niklas Holsti
2020-04-08 16:10 ` Alejandro R. Mosteo
2019-12-12 10:17 ` Lucretia
2019-12-12 14:32 ` Dmitry A. Kazakov
2019-12-12 15:14 ` Lucretia
2019-12-12 15:15 ` Lucretia
2019-12-12 18:24 ` Dmitry A. Kazakov
2019-12-12 18:30 ` Lucretia
2019-12-12 19:09 ` Dmitry A. Kazakov [this message]
2019-12-12 20:54 ` Lucretia
2019-12-12 21:12 ` Dmitry A. Kazakov
2019-12-13 11:11 ` Lucretia
2019-12-11 19:59 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox