Skip to content

feat(audio) Add all three wasapi backends (shared, shared-low-latency, exclusive) - #691

Open
alex-ong wants to merge 23 commits into
pnn64:mainfrom
alex-ong:wasapi-backends
Open

feat(audio) Add all three wasapi backends (shared, shared-low-latency, exclusive)#691
alex-ong wants to merge 23 commits into
pnn64:mainfrom
alex-ong:wasapi-backends

Conversation

@alex-ong

@alex-ong alex-ong commented Sep 7, 2026

Copy link
Copy Markdown
  • Add all three backends
  • Add windows specific text in options
  • Allow setting a preferred buffer size

I investigated why the input latency on DeadSync was 30ms~ in shared mode vs 10ms~ in ITGMania
They both use Shared (non -low latency) by default, but deadsync uses the default buffersize, whereas ITGMania uses the minimum provided.

Deadsync uses 0 hnsbufferduration, which according to microsoft is "lowest"

To set the buffer to the minimum size required by the engine thread, the client should call Initialize with the hnsBufferDuration parameter set to 0. Following the Initialize call, the client can get the size of the resulting buffer by calling IAudioClient::GetBufferSize.

I did try with 0.5.755 build, and got 26~ms after syncing.
however with 0.5.1156, i get 1-4ms after syncing. so whatever was causing it to be slower in 0.5.755 is gone.

During this time, i exposed SharedLowLatency and Exclusive.
I get slightly lower sync offsets in shared low latency (3-6ms), but surprisingly higher in Exclusive, i am guessing the driver itself panics when set to its lowest, if i bump the buffer duration up slowly my global offset goes down at some magic point.

@alex-ong
alex-ong marked this pull request as draft September 7, 2026 11:53
@alex-ong
alex-ong marked this pull request as ready for review September 8, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant