maybe plugin initialisation problems?

Hi,

I have been testing the caps-0.4.2 plugins within ardour2.7.1. There seems to be some problems.

Firstly, on my system (amd64, debian lenny) they did not work at all until I disabled the --ffast-math optimization and rebuilt them.

Secondly, I decided to make an experiment to see which (if any) of the caps plugins would work on my system with --ffast-math enabled by constructing a session with as many mono buses as caps plugins, where each bus had a single unqiue caps plugin (none with stereo inputs were used).

As several of the plugins generate their own sound, I routed these to a new bus to mix them together and from that bus, outputted them to the non-generative fx buses. The fx buses then output to the master bus which used the fast-lookahead limiter.

It all worked, all the buses had sound.

Next, I closed the session and recompiled the plugins with --ffast-math enabled. I reloaded the session.

No buses were audible, but the vu-meters on a couple were showing something there. I tried disabling all the plugins to see what happened: still no sound.

I reloaded the session and IIRC after enabling some of the sound-generating plugins, the sound started - until I enabled the sound of a lorenz attractor which cut all sound out again - effecting ladspa swh fast-lookahead-limiter too.

So I recompiled the plugins without --ffast-math again and reloaded the session, expecting everything to work again… It did not.

Again, going back to disabling all the plugins and then starting to enable them one by one, the lorenz sound cut all sound out, and alternatively, some of the fx plugins had this effect also.

That’s why I think there’s a problem here with plugin initialisation. At the moment I don’t know what further information (if any) you might want so please ask if required.

Despite all the problems I find, I still love this software!
Thanks,
James.

session file:
http://jwm-art.net/testcaps.ardour

You appear to have shown conclusively that this is a problem with the CAPS plugins and not Ardour.

The only thing I can recall that may be relevant to your problem is that some plugin packages are still using the old-style “fini” and “init” functions to handle plugin “library” initialization. Newer versions of gcc no longer support this method, and instead require the use of pragmas to declare constructor and destructor code in a shared object. I have some vague feeling that CAPS was one the plugin packages that had this problem, but I am not certain of this, and even if that was true, it may already have been fixed.

I’m not sure I understand. If that was the problem, would it not cause compile to fail? I tried grepping for #pragma in the caps src, but it’s not there. fini and init are…

Ok, I was about to say I understand not a jot, but think maybe the information at

http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

(all new to me) suggests replacing fini and init with constructor and destructor, correct?

Is it worth bringin up on LAD?
xxxxxxxxxxxxxxxxxx

Ok, sorry I was getting mixed up. You’re right, the caps plugins (via interface.cc) do use ((constructor)) and ((destructor)).

Can anyone tell me if the session ( http://jwm-art.net/testcaps.ardour ) I created works for them?

More behaviour description (using session described above):

targetted specific sound generation plugins:

C* Lorenz
C* Roessler
C* Sin

*** 1 ***
Provided the buses containing these plugins are
MUTED WHEN THE SESSION IS LOADED (ie they were muted before the
session was saved) all the other plugins work and these three
will work once the buses containing them are un-muted.

*** 2 ***
Instead of muting the buses, deactivate the above three plugins,
save the session and re-load, audio output is entirely broken again,
nor can it be restored.

*** 3 ***
Mute the above three buses AND deactivate the above three plugins,
save session, and re-load it. audio output is working. unmute the
three channels containing the nasty plugins, and audio output
continues. enable any of the three offending plugins and all audio
output is lost.

I’m gonna try these with jack-rack (which I need to build yet) and see what happens. I tried the C* sin plugin in qtractor, but that works differently - the busses are not ‘on’ until play is pressed.

I remember having some problems with some ladspa plugin and some gcc optimization and -ffast-math rings a faint bell (how’s about that for vague? :wink:

I think, for some versions of gcc (and plugins) at least, -ffast-math is not recommended.