Afaik, that is not the case on WASAPI, where – if you use that API explicitly instead of JUCE – you actually create the processing thread yourself, and you are responsible yourself for giving it some priority.
In general – please correct me if I’m wrong! – afaik there is nothing magic or special about this thread. OK, there is a bit of magic on macOS and iOS (CoreAudio), but in general there is no magic here. It’s just a thread.
On Windows, MMCSS can improve latency and reliability for both WASAPI and ASIO. The JUCE WASAPI wrapper already takes advantage of MMCSS, so I don’t think there would be any benefit to rolling your own WASAPI code.
For ASIO, Steinberg specifies that ASIO drivers should use MMCSS internally:
The driver should set an appropriate high priority for the thread. Starting with Windows Vista, Microsoft introduced the Multimedia Class Scheduler Service (MMCSS). On Windows Vista or any newer Windows version, ASIO driver threads must be in the “Pro Audio” class of MMCSS and their priority set to “CRITICAL”. This guarantees the highest execution priority for the bufferSwitch(). It lies within the sole responsibility of the ASIO driver to set the priorities of the threads it owns. An ASIO host shall by no means alter these priorities.
So any recent ASIO driver should be doing this already. MMCSS is a good thing.
https://docs.microsoft.com/en-us/windows/desktop/procthread/multimedia-class-scheduler-service
But - the real issue with Windows is the underlying kernel.
I spent a fair amount of time writing Windows audio drivers. Of course everyone wants to make an ASIO driver with consistent and isochronous callbacks to the client application, but the whole Windows DPC architecture makes that difficult. Essentially Windows NT is a preemptive multitasking system layered on top of a cooperative multitasking system.
Decent writeup about Windows DPCs and how they affect audio latency here:
https://support.focusrite.com/hc/en-gb/articles/208360865-Troubleshooting-DPC-latency
Microsoft docs say that an individual DPC shouldn’t execute for more than 100 microseconds, and that a driver should not hold a spinlock for more than 25 microseconds. But there’s no way for the OS to enforce those rules and they are routinely violated.
So, yes, the WASAPI MMCSS threads are better and more likely to be real-time. But any arbitrary kernel mode driver could run a DPC for a few milliseconds and wreak havoc. As long as the underlying OS is not real-time, there’s not much you can do.
Hope that helps-
Matt