Wrong value for isNonRealtime with Cubase 4


Hi Jules,

You should really remove the line

#if JUCE_WIN32
if (GetThreadPriority (GetCurrentThread()) <= THREAD_PRIORITY_NORMAL)
filter->setNonRealtime (true);

in juce_VstWrapper.cpp

I don’t know for what broken host it was added, but it is definitively breaking the isNonRealtime flag on Cubase 4 (the real-time audio thread gets called with a priority of -12 here)

edit: it is not cubase 4 specific, so maybe it is vista specific…

Wavelab && 2015-12-1 VST plugins: Removed old but flawed workaround for detecting offline mode

Right… I guess that -12 is a special number assigned to a very high priority thread, so maybe this would be a better test:

            if (GetThreadPriority (GetCurrentThread()) <= THREAD_PRIORITY_NORMAL
                 && GetThreadPriority (GetCurrentThread()) >= THREAD_PRIORITY_LOWEST)
                filter->setNonRealtime (true);


Yes that seems to work fine here


Hi Jules,

Just a small bump to recall you that the fix above is not in the SVN trunk !


Drat! Thanks, I don’t know how I managed to lose that one, will sort it out…