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

**URL:** <https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220>\
**Category:** Audio Plugins\
**Created:** [April 12, 2016, 8:52am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220 "2016-04-12T08:52:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [April 12, 2016, 8:52am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/1 "2016-04-12T08:52:54Z")

</div>

Is is true, that removing this workaround, stops the setNonRealtime(…) in current WaveLab 8.5 Windows.  
So what was the reason to remove the workaround, is there a better method for WaveLab now?  
And if there was no reason, why removing this workaround?  
The big problem is, costumers relying on the behavior, now it just stop working ☹

So if wavelab doesn’t report the offline mode properly, did someone tell the WaveLab developers in the last years, to fix this? Someone?

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

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [April 12, 2016, 9:12am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/2 "2016-04-12T09:12:08Z")

</div>

Aha! So WaveLab was the culprit!

Check the discussion about that [here](https://forum.juce.com/t/wrong-value-for-isnonrealtime-with-cubase-4/3416) and also [here](https://forum.juce.com/t/error-prone-non-realtime-processing-detection-in-vst-on-windows/16103)

tl;dr: it is a poor way to detect non-realtime processing, it also leads to wrong detection in other hosts (SONAR is sure one of them) and should be avoided in my opinion.

If compatibility with WaveLab is an issue, then restricting that patch ONLY to WaveLab on Windows is a must, in order not to mess with other hosts that support the VST protocol way to report non-realtime processing properly

EDIT: also, adding a specific ‘if’ that checks the host to which the workaround applies, leaves a very useful trace in the code of the host for which the workaround is necessary. It is a nice thing to have when looking back at old code to understand why it was put there. (aside from, obviously, proper documentation with comments)

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [April 12, 2016, 9:23am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/3 "2016-04-12T09:23:41Z")

</div>

I recommend if somebody finds a bug or misbehavior in a plugin host, please TALK to the developers of the host. Most of them are nice people! There is a real chance to get rid of the workarounds.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [April 12, 2016, 9:35am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/4 "2016-04-12T09:35:53Z")

</div>

So for the moment just?

```
                #if JUCE_WINDOWS
			const PluginHostType host (getHostType());

			if (host.isWavelab() && GetThreadPriority (GetCurrentThread()) <= THREAD_PRIORITY_NORMAL
				&& GetThreadPriority (GetCurrentThread()) >= THREAD_PRIORITY_LOWEST)
				filter->setNonRealtime (true);
		#endif
```

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [April 14, 2016, 10:35am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/5 "2016-04-14T10:35:42Z")

</div>

Ah yes, WaveLab. @chkn, WaveLab is the one DAW where I wouldn’t waste my time asking them for help, based on previous experience.

But thanks for the discussion, guys, it does sound like re-adding this for WaveLab only would be a sensible workaround.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [April 14, 2016, 10:56am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/6 "2016-04-14T10:56:37Z")

</div>

There should be an open document, ideally inside the git repository, which collects all information about weird host-behavior.

So nobody has to search in the forum several hours, and as a central point of information for plugin-developers/host-developers/customers

---

<div class="post-metadata">

**Author:** ![kunitoki](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kunitoki/32/15_2.png) [@kunitoki](https://forum.juce.com/u/kunitoki)\
**Post date:** [April 14, 2016, 1:48pm UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/7 "2016-04-14T13:48:59Z")

</div>

> [@chkn](#):
>
> Most of them are nice people!

You are talking about Steinberg man

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [April 22, 2016, 7:15am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/8 "2016-04-22T07:15:02Z")

</div>

> There should be an open document, ideally inside the git repository, which collects all information about weird host-behavior.

This sounds like a great idea. I think a Google doc may be better though as it allows everyone to collaborate.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [April 22, 2016, 8:04am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/9 "2016-04-22T08:04:42Z")

</div>

> [@fabian](#):
>
> This sounds like a great idea. I think a Google doc may be better though as it allows everyone to collabora

everyone with a google account 😉 Or just simple \*.txt-file in a separate git repository?

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [April 22, 2016, 8:13am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/10 "2016-04-22T08:13:10Z")

</div>

Locating it in the git repo seems like a more sensible idea, so it is possible to track its history easily and relate it with fixes/workarounds in JUCE.

Also, I’d avoid letting it be a public document where everyone can collaborate, it’s too high the risk that this will transform it into a makeshift (and poor) bug reporting system: what one sees as one particular host’s quirk, could in reality be a JUCE bug and vice-versa.

I’d start by putting in it the remarks on various hosts and formats that have been added at the bottom of the multibus guide post: that seems to me like the perfect style for that document to have

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [April 22, 2016, 8:33am UTC](https://forum.juce.com/t/wavelab-2015-12-1-vst-plugins-removed-old-but-flawed-workaround-for-detecting-offline-mode/17220/11 "2016-04-22T08:33:52Z")

</div>

For collaborate host document please take this [detour: collaborate document for host specific behaviour](https://forum.juce.com/t/collaborate-document-for-host-specific-behaviour/17424)  
Thanks

@fabian, @yfede, @chkn: sorry, can you post there again or copy there? That way we can follow that discussion and maybe it will become true… hopefully…
