[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
autotools and ifdefs
From: |
Andrei Kholodnyi |
Subject: |
autotools and ifdefs |
Date: |
Mon, 6 Dec 2010 20:18:37 +0100 |
On Mon, Dec 6, 2010 at 10:25 AM, Bohdan R. Rau <ethanak at polip.com> wrote:
> On Sun, 5 Dec 2010 15:07:25 -0600, William Hubbs <w.d.hubbs at gmail.com>
> wrote:
> [...]
>>>
>>> +#ifdef HAVE_SAMPLERATE
>>> + ? ?float rsbuf[SONIC_BUFFER_SIZE];
>>> + ? ?SRC_STATE *resampler=NULL;
>>> + ? ?SRC_DATA resdata;
>>> +#endif
>>
>> I wouldn't have a problem with this #ifdef, because it is blocking off
>> certain statements, probably based on something defined in
>> config.h.
>
> Exactly.
>
> Supersonic may be compiled without libsamplerate (in this case "pitch"
> parameter is simply ignored).
well, I'd rather implement a separate function which covers only
dependent on libsamplerate functionality
and then based on the availability of libsamplerate include it in the
build or use a dummy function instead
>
> [...]
>>
>>> + ? ?if (!rate
>>> +#ifdef HAVE_SAMPLERATE
>>> + ? ? ? ? ? ?&& !pitch
>>> +#endif
>>> + ? ? ? ? ? ?) {
>>
>> ?This, on the other hand, I definitely disagree with. ?I do not agree
>> ?with using #ifdef's to break up conditionals like this.
>
> So - what's your suggestion in this case?
rethink the way of integration.
- [PATCH] determine availability of audio plugins by using config.h, (continued)
- [PATCH] determine availability of audio plugins by using config.h, William Hubbs, 2010/12/05
- [PATCH] determine availability of audio plugins by using config.h, Andrei Kholodnyi, 2010/12/05
- [PATCH] determine availability of audio plugins by using config.h, William Hubbs, 2010/12/05
- [PATCH] determine availability of audio plugins by using config.h, Andrei . Kholodnyi, 2010/12/06
- [PATCH] determine availability of audio plugins by using config.h, Christopher Brannon, 2010/12/06
- [PATCH] determine availability of audio plugins by using config.h, Andrei Kholodnyi, 2010/12/06
- [PATCH] determine availability of audio plugins by using config.h, Andrei Kholodnyi, 2010/12/05
- autotools and ifdefs, William Hubbs, 2010/12/05
- autotools and ifdefs, Andrei Kholodnyi, 2010/12/05
- autotools and ifdefs, Bohdan R . Rau, 2010/12/06
- autotools and ifdefs,
Andrei Kholodnyi <=