Wavelab problems

The wrapper should now avoid causing deadlocks in Wavelab.

…but… Wavelab uses a different threading model to all the other hosts, so there’s still a danger that your code could have problems for which I can’t possibly provide a workaround. Until the UI editor has been opened, any messaging/event functionality will fail, because on win32 it’s impossible to initialise the messaging system on a background thread. Normally this shouldn’t be too much of a problem, because a UI will generally be shown at some point, but if you open a saved project that contains some plugins, without any of their UIs getting opened, and then start playing, then any messaging/event/timer code that you use will be fucked.

I’ve discussed this in frustrating detail with the wavelab developers, but their attitude is that although the VST spec recommends using the UI thread for calling into the plugin, it doesn’t actually stipulate doing so. So technically they’re “allowed” to use other threads, so this isn’t their problem. I explained that this makes it impossible for us to use any kind of OS events, but unfortunately their reply was “why would anyone want to do that?” (!)

So in summary, your plugins may still not work 100% - the only way to find out is to test it. If it doesn’t work, then you may need to avoid using any kind of event-based functionality. Or just add your plugin to the long list of plugins out there which work in all hosts apart from wavelab…

well, it seems to work! I am waiting on reports from a few beta testers, but on my system it runs as should.

Thank you very much for your time on this one, I really appreciate that!

I just got this info from one of my testers. Apparently it is from a Steinberg developer:

[quote]The VST GUI code behaves differently according to the host’s HIView hierarchy, and based on that, wrongly offsets the plugin view’s bounds.

In mode details:
this happens in CDrawContext::CDrawContext in vstgui.cpp (also happens in COptionMenu::takeFocus)

See the following line (and its condition statement before, which is true for WaveLab and false for Cubase):

HIViewConvertRect (&bounds, (HIViewRef)pFrame->getPlatformControl (), contentView);

It should be in fact:

HIViewConvertRect (&bounds, HIViewGetSuperview((HIViewRef)pFrame->getPlatformControl ()), contentView);

Because ‘bounds’ as input is not relative to (HIViewRef)pFrame->getPlatformControl(), but to its parent (because it was obtained with HIViewGetFrame)
Hence the current call is wrong if you refer to Apple’s documentation about HIViewConvertRect.
The result is that ‘bounds’ is offset twice. Hence the display problem in WaveLab.

The above change in vstgui.cpp solves the problem with WaveLab. [/quote]

Of course, Juce is not VST GUI. But maybe this is useful information. Apparently the VST GUI bug has been fixed.

Sean Costello