New Wasapi mode?

Started by rv,

rv

Hello,
I always used Wasapi exclusive mode event driven for lowest possible latency (256 or 6ms or less) for real time synth.
It was always working very good

I just bought a new laptop Lenovo very fast with i9 cpu, latest windows 11, but the wasapi latency is bad, whatever the audio card i am using !

I have downloaded the trial of Pianoteq stage https://www.modartt.com/try
As they have a very good standalone test app for audio devices.


I was surprised that they have now 3 different modes : Windows Audio , Windows Audio (Exclusive mode) and Windows Audio (Low Latency mode)

Only this low latency mode is giving low latency

Is there any new windows/wasapi options to tell windows that we want low latency? Exclusive mode seems not enough now

Regards,


Falcosoft

#2
Hi,
Bass_WASAPI has already been supporting low latency shared mode for a while:
https://www.un4seen.com/doc/#basswasapi/BASS_WASAPI_Init.html

Remark section:
QuoteShared mode usually has a fixed period of 10ms, but Windows 10 supports shorter periods, which allows smaller buffers and lower latency. A shorter period (and buffer) can be requested by setting buffer to 0 and period to the length wanted...

According to my experiences this mode needs proper drivers. Usually proprietary vendor drivers from Realtek, NVIDIA etc. do not support low latency shared mode. But generic High Definition Audio driver from Microsoft does support it on Windows 10/11..
You are lucky if your laptop's audio driver supports it natively.
When it is supported at 48KHz low latency shared mode's period can be set as low as 128 samples (~2.66 msec.) which is even lower than minimum supported period of  144 samples (~3 msec.) in exclusive mode.
But the buffer size is calculated automatically from the period such a way that in practice this mode results in somewhat worse latency than exclusive mode.