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.
Thanks in advance for the help,
Aurélien
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03.01.2015 12:48, Alexandre Bique wrote:
>> 3] It would make plugin development easier if it was required to
>> call deactivate() on a plugin before clap_destroy'ing it. The
>> additional burden on the host would be small. Is there a good
>> reason for it to be this way?
>
> I did it this way for robustness reasons. Because even if the host
> has a bug in his destroy code path and forgets to deactivate, the
> plugin must handle this case correctly.
OK, let me put it this way. It really is a number's game. Let's take a
successfull plugin standard like VST. There's thousands, maybe tens of
thousands of plugins, but maybe tens to hundreds of hosts. So there's
an order of magnitude or two difference.
Every plugin has to have this extra check. What are the chances that a
few plugin authors forget to do this check? What are the chances that
a few hosts get this wrong? What are the chances that plugins get
fixed? What are the chances that hosts get fixed? Also it's just
boilerplate code. If every plugin has to do it, then it shouldn't have
to do it at all since it clearly can be automated. And the automation
in this case is just the host calling deactivate before destroy.
Give the plugin authors as much guarantees as possible.
With the proposed way around plugins might work in some hosts that
honour the standard, but not in others (I.e. ones that do call
deactivate() before destroy() vs. those that do not). If you make
calling deactivate() before destroy() a requirement this whole problem
just goes away. It makes life easier for the plugin developer while
not making life _much_ harder for the host dev. Also it's trivial to
implement a test plugin for host devs to use that checks things like
this - one that does basically just copy input to output but checks
that lifecycle requirements are met by the host:
- - abort() on calling process() before activate
- - abort() on calling destroy before deactivate()
- - etc..
Have fun,
Flo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJUp/nYAAoJEA5f4Coltk8Zk+AH/0mnqvtw09iw2Mccyj4UTzBY
xgm7n0i9N664e2qk2a0JrmRs/gOxAy1ddMGiNbXzgfI+mMqdh1XRlIgm0APcu+mK
xAyxsYQuNVM88wq1kVVETAve/dvdAqMVYFkwViR5a7HlPPZVzj0vAsbAJT8HNWE3
O9oayGVDkzvY30ax13ktrFGSiMgiY1qEZq9DhapxTSwr929LnIGHzCWNSEXTepxi
iSF/5k4j61V/zEFCNjL1/gHOdvANwKTbSQTXcNUY8RrbiR6vU18H/7wEypIbNI9a
4s4lHdzw4paAcIuj/Xvjqc8NUGi67z6BGRKqDU9y6jPg99T7vqX4lFCIScFV2go=
=0gbu
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sending this to LAD (additionally to replying to the author directly)
as I cannot post answers to LAA and maybe it's interesting to keep
this discussion on LAD..
On 29.12.2014 16:48, Alexandre Bique wrote:
> Hi,
>
> I worked on a new plugin interface, it is not yet finished and set
> in stone, but ready enough to gather initial feedback and advice.
>
> The specification is hosted on github:
> https://github.com/free-audio/clap and is available under the MIT
> license. There is a generated specification document at:
> http://free-audio.github.io/clap/
>
> I hope that you'll find it interesting and give it a chance.
> Thanks.
>
> Regards,
>
Hi, I'm just skimming over the generated docs. Generally it's a
laudable effort but maybe a few years too late. I guess many people in
the linux audio community would agree that there is no lack of plugin
standards :) Some remarks:
1] The generated docs display rather badly in my browser as I cannot
move the separator between the two "lanes" which results in the left
one not being readable at least partly.
http://i.imgur.com/4MhRWvf.jpg
(yes, this is a two monitor setup with an upright 4:3 monitor on the
left :))
2] It would be cool if clicking on a function name in the left panel
would take you to the function declaration in the right panel. E.g.
clap_create.
3] It would make plugin development easier if it was required to call
deactivate() on a plugin before clap_destroy'ing it. The additional
burden on the host would be small. Is there a good reason for it to be
this way?
4] The plugins collection query mechanism (with index 0) seems a
little "hackish". Why not have extra functions for it?
5] tunning -> tuning (spelling)
6] Adding to 3]: Change some of the "should not" to "must not" as it
would make the API semantics clearer. Example:
"Also deactivate() should not be called if the plugin is not
activated. Yet the plugin should handle a call to deactivate() even if
it is not activated."
How should it handle it? It would be simpler to just make this a "must
not". Little additional burden on the host while making every single
plugin easier to implement and less error prone..
That's it for now (it's how far I got into reading the spec). Have fun,
Flo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJUp8xtAAoJEA5f4Coltk8ZCogIALDFJMjfOrg3jeGrp6IB6dk/
3LvICyE53XrdjZsBqbETAPY6LAIf5HOwuoyU8JbBPECirILKM0T5diK/+G9CMTJL
gx93UTWkdWVFivVI79y5Rys+Fj3fRBpknBXttplATBohIeMWvam8ey2F5/6UN82H
y3IVPp+y9CXsEZ6Ekv/Z25S5FWlBQ7X2mdojafWnxk8euJedPSAUFF3248LHvAaX
oeNZkMX7KANlw+3r/8R0mOhez/Z1p016Q5/Ckc1U/t6kHoAeSHNSDmL1ONS/0hzL
VEcVHjLoxSDpW3D2NksKtkTK6w98xHS7BQtG9Rm8c2h0ReA6JWXunE2MClbltVI=
=jS92
-----END PGP SIGNATURE-----
Hello everybody, please take a look at
http://sourceforge.net/p/ags/files/minos-one_v1.1.iso
It targets mainly users interested in gobject and gtk+ based applications.
minos-one starts as default within openbox and proper systemd usage.
It should be entirely based on Free Software, please report inappropriate
content.
Since threads aren't really reliable in `ags` me has some difficulties to
get a screencast because system freezes and no input possible, but take a
look at my google+ page of Advanced Gtk+ Sequencer
- Linux 3.14.25-rt22
- Advanced Gtk+ Sequencer 0.4.2-21
- Swami
- fluidsynth
- LADSPA
- ffmpeg
- mplayer
- wine-64
- dssi-vst
- bristol
- jackd
- ...