Re: [LAD] fftw_complex and C++11

From: Aurélien Leblond <blablack@email-addr-hidden>
Date: Sun Jan 04 2015 - 15:56:51 EET

>
> > Hi all,
> >
> > I'm porting the FFT Vocoder from AMS to ams.lv2.
> > The FFT Vocoder is using fftw_complex, and I can compile my code if I use
> > -std=c99 but not if I use -std=c++11
> >
> > I get error like:
> >
> > error: incompatible types in assignment of ‘float’ to ‘fftw_complex {aka
> > double [2]}’
> > modinforward[l2] = modbuf[l2] * window[l2];
> >
> > error: cannot convert ‘double*’ to ‘__complex__ double’ for argument ‘1’
> to
> > ‘double creal(__complex__ double)’
> > p(p_modulatorfft)[l2] = logf(fabs (creal (modoutforward[l2])) + 1.0);
> >
> > error: invalid array assignment
> > modinbackward[ lclfrq ] = modoutforward [l2];
> >
> > carrinforward, carroutforward, carrinbackward,
> > carroutbackward, modinforward, modoutforward, modinbackward,
> modoutbackward
> > are pointers to fftw_complex.
> >
> >
> > Would you guys have any idea why it doesn't compile in the c++11
> standard?
> >>From my research I saw there were some changes between c99 and c11 with
> > complex numbers, but I can't figure out how to bring the code to C++11.
> >
>
> Just to make sure I understand correctly. Your goal is to rewrite the
> code from c99 to c++11 and not c11?
>
>
Well all the plugins in ams.lv2 are coded in c++ and are compiled with the
c++11 standard.
But when ported the FFT Vocoder, it only compiles when using the c99
standard.

So I guess yes, I would like to rewrite the code from c99 to c++11.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sun Jan 4 16:15:01 2015

This archive was generated by hypermail 2.1.8 : Sun Jan 04 2015 - 16:15:01 EET