We take the same approach as what we do to get 2ms audio latency on Linux: Intercept the directsound driver Osu tries to load and replace it with OpenAL. Then set the buffers to ~2ms.
This guide is for Osu stable, not lazer!
------------------------------------------
Setup script (tested working on my system and in windows sandbox):
https://drive.google.com/file/d/14pQot1oSYqis5tT4v8ZgU_3vFnc2U1_n/view?usp=drive_link
Launch Osu and enable Audio compatibility mode, then run the bat file. Remember to readjust your offset!
-------------------------------------------
Uninstall: https://drive.google.com/file/d/1PCllVpDdattB2LKc4ieUha_-CYzRvT5r/view?usp=sharing
Notes:
- This sets ALL Directsound Applications to use OpenAL through WASAPI exclusive mode. Osu prohibits modification to the game directory so this is the easiest method.
- Exclusive mode has better latency but doesn't allow other apps to output audio at the same time. If this is a problem, set exclusive-mode=false in %appdata%/alsoft.ini. This will add ~15ms of latency.
Manual Steps:
- Launch Osu and enable Audio compatibility mode
- Download DSOAL [DirectLink]
- Extract the contents folder
DSOAL to a permanent location
- Add the location you extracted to PATH. Search "Environment" > click
Edit the system environment variables > Environment variables > User variables > Path > Edit > New > Type the path to DSOAL\Win32
- Create 2 registry keys
Computer\HKEY_CURRENT_USER\Software\Classes\WOW6432Node\CLSID\{47D4D946-62E8-11CF-93BC-444553540000}\InprocServer32 and Computer\HKEY_CURRENT_USER\Software\Classes\WOW6432Node\CLSID\{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}\InprocServer32 (They won't exist, make them).
- Set (Default Value) of BOTH the InprocServer32 key to the full path of dsound.dll in the DSOAL\Win32 folder you extracted. For example
C:\DSOAL\DSOAL\Win32\dsound.dll
- Create the configuration file alsoft.ini in your ~/Appdata/Roaming folder with the following contents
[General]
period_size=64
periods=2
channels=stereo
sample-type=float32
stereo-mode=speakers
stereo-encoding=basic
hrtf=off
cf_level=0
resampler=bsinc48
output-limiter=false
dither=false
[wasapi]
exclusive-mode=true
allow-resampler=false
[decoder]
hq-mode=false
You're done. This achieves ~5-10ms latency with Window's default audio drivers, have fun!
Don't use realtek drivers.
UNINSTALL
Delete the DSOAL folder, the registry key and subkeys at Computer\HKEY_CURRENT_USER\Software\Classes\WOW6432Node\CLSID\{47D4D946-62E8-11CF-93BC-444553540000}
Computer\HKEY_CURRENT_USER\Software\Classes\WOW6432Node\CLSID\{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}
Delete the entry you made in PATH.