A kernel-level virtual audio driver for Windows providing two distinct virtual audio cables (Session A and Session B) with loopback capabilities. This driver allows applications to route audio between endpoints (Speaker -> Microphone) with low latency.
This driver modifies the Microsoft Virtual Audio Device (MSVAD) sample to include a circular buffer loopback mechanism.
- Render Stream (Speaker): Audio written to the render endpoint is copied into a shared circular buffer.
- Capture Stream (Microphone): Audio read from the capture endpoint is pulled from the same circular buffer.
This allows any audio played to the "Sweetly Session Output" device to be immediately available on the "Sweetly Session Input" device.
The driver installs the following devices:
- Sweetly Session A
- Output: "Connect to Sweetly Session A Output"
- Input: "Connect to 3rd Party App Input"
- Sweetly Session B
- Output: "Connect to 3rd Party Output"
- Input: "Connect to Sweetly Session B Input"
- Visual Studio 2022
- Windows Driver Kit (WDK) 10
- Open the
x64 Native Tools Command Prompt for VS 2022. - Navigate to the project root.
- Run the build command:
msbuild "simple\vadsimpl.vcxproj" /p:Configuration="Win8 Release" /p:Platform=x64 /t:Rebuild /p:TargetName=vadsimpl
msbuild "simple\vadsimpl.vcxproj" /p:Configuration="Win8 Release" /p:Platform=x64 /t:Rebuild /p:TargetName=vadsimpl_bSince this is a kernel driver, it must be signed. For development usage, create a self-signed certificate:
- Generate a certificate and add it to the store (one-time setup).
- Sign the binaries:
signtool sign /fd sha256 /td sha256 /s PrivateCertStore /n "SweetlyLocalTest" /a /tr http://timestamp.digicert.com "simple\x64\Win8Release\vadsimpl.sys"
signtool sign /fd sha256 /td sha256 /s PrivateCertStore /n "SweetlyLocalTest" /a /tr http://timestamp.digicert.com "simple\x64\Win8Release\vadsimpl_b.sys"- Add the driver package to the driver store:
pnputil /add-driver "msvad.inf" /install- Create the virtual devices using
devcon.exe(requires WDK tools):
devcon install "msvad.inf" Root\SWLYSessionOutput
devcon install "msvad.inf" Root\SWLYSessionInput
devcon install "msvad.inf" Root\SWLYSessionOutputB
devcon install "msvad.inf" Root\SWLYSessionInputB