Problem with using AU & VST simultaneously


#1

Hi,

when I open my plugin in Reaper as AU and after that as VST (or vice versa) the second format won’t get any timerCallback calls. In Live the second format won’t even open the GUI window; AudioProcessor::createEditor() isn’t called when trying to open the GUI. I didn’t test with other hosts (are there any that support AU & VST ? ).

I checked in Reaper with the JuceDemoPlugin, no problem there.

I’m a bit at a loss now. I don’t think this really is related to the Timer class cause there is not much in there and I also only changed timerCallback(). Also Live not opening the GUI at all is probably Live’s way to prevent further problems with the plugin.
I suppose something leaked somewhere, but I can’t think of a way to trace that. I suppose there aren’t any shared resources between AU and VST at runtime?
Also I didnt’t use locks in my code. It seemed to me not necessary but on the other hand I never wrote anything thread-critical before.

Any sugestions what this might be or how I could trace is?

Chris


#2

Yeah, this has been discussed before and is a result of the crappy way that objective-C linkage happens. Basically because your AU and VST are identical, and both are loaded, the obj-C linker mixes up all their classes because the names are the same. Using JUCE_ObjCExtraSuffix prevents this happening between different binaries, but is no help if the two binaries are the same thing with different names.

I believe some people have got around it by running a script phase in their build that hacks either the AU or VST binary to alter the extra suffix string, but I can’t think of a neater solution than that, I’m afraid.


#3

Thanks, I’ll look into that.

Chris


#4

I solved this now by creating separate projects for AU and VST with different JUCE_ObjCExtraSuffix definition. Maybe not the best way, but quite easy (copy&paste plus unchecking VST or AU in Jucer) and since it’s mainly necessary for releases not that much overhead to do.

Chris


#5

Good solution. Pity there’s not a non-hacky way to do the same thing in a single project.


#6

I have found that the dual project solution is necessary for getting my plugins to work properly as both Windows VSTs and Windows RTAS. The polymorphic plugins are a great idea, but I don’t know if the operating systems are quite ready to deal with such advanced ideas. :mrgreen:

Fortunately, the new Jucer makes creating projects very easy. Very good idea above for reserving parallel projects for release builds only.

Sean Costello