NAudio version 3 has been released, marking a complete modernization of the .NET audio library. Key changes include rewritten COM interop using GeneratedComInterface and LibraryImport for NativeAOT and trimming support, redesigned IWaveProvider and ISampleProvider interfaces using Span<T>, and a full review of hundreds of open issues and pull requests. New capabilities include a suite of managed effects, VST3 hosting, a managed sampler/sequencer, improved SoundFont 2 support, and updated WasapiPlayer/WasapiRecorder/AsioDevice classes. NAudio is no longer Windows-only: NAudio.Core and NAudio.Midi are cross-platform, with a new NAudio.Alsa library enabling Linux playback and recording, and macOS support potentially coming via a community contribution. A migration guide from NAudio 2 to 3 is available. The author credits Claude Code, provided through Anthropic's Claude for Open Source initiative, for accelerating the months-long rework, while noting a stabilization period with preview releases to maintain code quality.
Questions this post answers
What's new in NAudio 3 compared to NAudio 2?
NAudio 3 is a complete modernization of the .NET audio library, adding cross-platform Linux support via a new NAudio.Alsa library, VST3 effect hosting, a fully managed sampler and sequencer, and improved SoundFont 2 support. Core interfaces like IWaveProvider and ISampleProvider now use Span<T> for buffers, COM interop uses GeneratedComInterface for NativeAOT support, and Windows-only features moved into separate assemblies from the cross-platform NAudio.Core and NAudio.Midi. Developers planning the NAudio 2 to 3 migration can follow ongoing library changes on daily.dev.
Is NAudio still Windows-only?
No, NAudio 3 splits Windows-only features into their own assemblies, leaving NAudio.Core and NAudio.Midi fully cross-platform. A new NAudio.Alsa library adds playback and recording support on Linux, paired with NAudio.SoundFile for reading and writing common audio file formats across platforms, and macOS support is expected via an in-progress community pull request. Anyone evaluating cross-platform audio libraries for .NET can track NAudio's roadmap on daily.dev.
Which classes should I use for WASAPI and ASIO audio in NAudio 3?
Use WasapiPlayer, WasapiRecorder, or AsioDevice for all audio recording and playback needs going forward, since these are the new and improved classes for the two most important modern Windows audio APIs. They expose additional capabilities compared to earlier NAudio classes, including WASAPI low latency mode and individual process audio capture. Windows audio developers weighing API choices can keep tabs on NAudio updates through daily.dev.