Modern Windows audio interface, supports both inputs and loopback.

The Windows Audio Session API is the recommended way of sourcing low-latency audio data on Windows 7 and later systems. It supports both input devices (such as microphones), and output devices (loopback from speaker output).

Source Code. Uses Vannatech’s netcoreaudio.


Option NameTypeDefaultRangeDescription
Device IDs
If "default", then the default render (output) device at the time of startup will be used.
If "defaultInput", then the default capture (input) device at the time of startup will be used.
If "defaultTracking", the default device will be used, and will keep up with changes to the default, switching as the system does (not yet implemented).
If a device ID is specified, that device is used, but if it is not found, then behaviour reverts to "default".
ShowDeviceInfobooltrueIf true, outputs currently connected devices and their IDs at startup, to help you find a device.

Device IDs

Device IDs are unique for each device on the system, vary between different computers, and only change if drivers are updated/changed. Removal and re-attachment of a USB device will not change the ID. They are not readily visible to the user, but other software using WASAPI will have access to the same IDs. Use ShowDeviceInfo (above) to find the ID for your preferred device. Output format is:

[Index] "Device Name" = "Device ID"  

(Index is not used, it is just present to make the list easier to read)