Hello,
One year after I come back to this suggestion, to turn Windows in a RT mode
(enough RT for RT audio I mean),
after having thought to different possibilities like thread RT
characteristics, Core Allocation etc
.
the conclusion is that all are complicated on both side (windows developers
and application developers).
So the simplest way for everyone remains to offer a System Mode (possibly
located in system / performance dialog box)
allowing to place the Windows Operating System with 0.1 ms timing (instead
of 1 ms today).
And to provide at least one new function:
uSleep(microsecond) to be able to wait for 100 ums (= 0.1 ms)
also possibly:
MicroWaitForSingleObject(hEvent, umsWait);
And a function to check if the operating system is in RT mode or not.
Regards
Vincent Burel
De : wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] De la part de Vincent Burel
(VB-Audio)
Envoyé : mercredi 28 septembre 2016 09:34
À : wdmaudiodev@xxxxxxxxxxxxx
Objet : [wdmaudiodev] Windows & Real Time : suggestion to Microsoft Kernel
Developers
Hello,
I develop Real Time Application under Windows since WIN95 and I finally got
the following conclusion,
to improve Real Time under Windows
and to compete with Audio Hardware
Devices (for example based on DSP or FPGA):
We are missing a single function :
Sleep(0.1f) or uSleep(100)
Even with a 20% timing error, it will allow to manage 8 to 16 samples audio
buffers (which is the latency range for current audio hardware devices)
General algorithm for Real Time Streaming Management are basically like
these:
TimeCritical_Thread()
{
While (fRunning)
{
PullPushDataIfRequired(
);
nbLoop++;
Sleep(msPolling);
}
}
Or
TimeCritical_Thread()
{
While (fRunning)
{
WaitForSingleOBject(hEvent, msPolling);
PullPushDataIfRequired(
);
nbLoop++;
}
}
With a guaranteed number of loop around 8000 to 12000 per second. it is
enough to manage 0.5 ms audio buffer latency.
(while the current Sleep(1) function allows today to manage 5 ms audio
buffer latency in pretty reliable way -).
Regards
Vincent Burel
www.vb-audio.com
www.mt128.com
www.vb-cable.com
www.voicemeeter.com
https://www.facebook.com/vbaudiosoftware
https://plus.google.com/110557338955940627490
https://twitter.com/VB_Audio