[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
autotools and ifdefs
From: |
Bohdan R . Rau |
Subject: |
autotools and ifdefs |
Date: |
Mon, 06 Dec 2010 10:25:51 +0100 |
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).
[...]
>
>> + 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?
#ifdef HAVE_SAMPLERATE
if (!rate && !pitch)
#else
if (!rate)
#endif
For me it's not good solution (I hate duplication of code)...
ethanak
--
http://milena.polip.com/ - Pa pa, Ivonko!
- [PATCH] determine availability of audio plugins by using config.h, (continued)
- [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/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 <=
- autotools and ifdefs, Andrei Kholodnyi, 2010/12/06