From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.3d73Ybk3C5U4I2t8lv+lAQ.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this actually possible? Date: Thu, 12 Dec 2019 22:12:30 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <36d45c82-2a6b-4c60-baeb-1a4aef5189c7@googlegroups.com> <69c7677b-4aec-4db2-b240-de6b69f762b9@googlegroups.com> <23879d99-f1b0-4ade-8f2a-e45014fa04a7@googlegroups.com> <5260b4d5-23e7-40f4-ada7-6a3158dbdf80@googlegroups.com> <35e003d5-0805-43f5-ae25-fb94ad201942@googlegroups.com> <01eb359c-4898-4e52-8c86-c8c89c55ff75@googlegroups.com> <3e9872d9-0ced-4a9e-a58c-0155a564c071@googlegroups.com> NNTP-Posting-Host: 3d73Ybk3C5U4I2t8lv+lAQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:57723 Date: 2019-12-12T22:12:30+01:00 List-Id: On 2019-12-12 21:54, Lucretia wrote: > On Thursday, 12 December 2019 19:09:25 UTC, Dmitry A. Kazakov wrote: >> 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? > > You didn;'t look at both links I posted. That was from the linked header file. Could you simply post C code of what you mean? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de