AudioDeviceLib
A .NET library for Windows audio devices. Enumerate playback and recording endpoints, choose defaults, control volume and mute, and receive device and session notifications from C# without hosting PowerShell.
Get started
dotnet add package AudioDeviceLib --prerelease
using AudioDeviceLib;
foreach (var device in AudioController.ListDevices(AudioDeviceKind.Playback))
{
System.Console.WriteLine(device);
}
Documentation
- Getting started: requirements, installation, and a first example.
- Working with devices: live endpoints, snapshots, volume, and defaults.
- Notifications: device, volume, and session callbacks.
- Lifetime and threading: ownership, disposal, and callback safety.
- API reference: public types and members generated from the library source.
- Contributing: build, test, and publish this site.
Windows is required at runtime. The package targets .NET Framework 4.8, .NET Standard 2.0, and .NET 8 for Windows. Native AOT and trimming are unsupported.
License
AudioDeviceLib is licensed under MIT. See the third-party notices for attribution and incorporated license terms.