NAudio.Asio 3.0.0-preview.15
NAudio.Asio
ASIO driver support for NAudio. Windows-only (net9.0-windows).
What's included
AsioOut— low-latency playback and/or recording through any installed ASIO driver- ASIO driver enumeration (
AsioOut.GetDriverNames()) - Channel routing, per-channel input metering, and access to the driver's control panel
- Interop types for building your own ASIO host code
When to use it
ASIO is the right choice when you need very low round-trip latency — typical in pro-audio, virtual instruments, and multi-channel recording scenarios — and the user has a working ASIO driver installed (manufacturer-supplied, ASIO4ALL, FlexASIO, etc.). For general-purpose playback/capture prefer NAudio.Wasapi or NAudio.WinMM.
See the NAudio GitHub repository for full documentation and tutorials, including AsioPlayback.md and AsioRecording.md.
License
MIT. ASIO is a trademark of Steinberg Media Technologies GmbH — this package is a driver-consumer only; you are responsible for any agreement required to redistribute the ASIO SDK in your own shipping product.
Showing the top 20 packages that depend on NAudio.Asio.
| Packages | Downloads |
|---|---|
|
NAudio
NAudio, an audio library for .NET
|
17 |
|
NAudio
NAudio, an audio library for .NET
|
16 |
|
NAudio
NAudio, an audio library for .NET
|
15 |
|
NAudio
NAudio is an open source .NET audio library — playback and recording, file readers and writers, MIDI, DSP and effects, with platform-specific backends auto-selected by target framework.
|
15 |
|
NAudio
NAudio, an audio library for .NET
|
14 |
|
NAudio
NAudio is an open source .NET audio library — playback and recording, file readers and writers, MIDI, DSP and effects, with platform-specific backends auto-selected by target framework.
|
14 |
|
NAudio
NAudio, an audio library for .NET
|
13 |
|
NAudio
NAudio is an open source .NET audio library — playback and recording, file readers and writers, MIDI, DSP and effects, with platform-specific backends auto-selected by target framework.
|
13 |
|
NAudio
NAudio, an audio library for .NET
|
12 |
|
NAudio
NAudio, an audio library for .NET
|
11 |
|
NAudio
NAudio is an open source .NET audio library — playback and recording, file readers and writers, MIDI, DSP and effects, with platform-specific backends auto-selected by target framework.
|
10 |
|
NAudio
NAudio is an open source .NET audio library — playback and recording, file readers and writers, MIDI, DSP and effects, with platform-specific backends auto-selected by target framework.
|
9 |
NAudio 3 is a major release. The single NAudio assembly is now split into
focused, independently usable packages; the minimum target framework moves to
net9.0; the core is cross-platform and Native-AOT compatible; and several
large new subsystems — a cross-platform effects suite, a software sampler, VST 3
hosting, and ALSA and libsndfile backends — join the library. The headline
changes are below; see the linked tutorials and the per-package READMEs for the
detail.
Packages and platform
- Minimum target framework is now
net9.0— legacy .NET Framework and .NET Standard 2.0 support is dropped NAudiois now a set of focused packages:NAudio.Core,NAudio.Midi,NAudio.WinMM,NAudio.Wasapi,NAudio.Asio,NAudio.WinForms,NAudio.Dmo, plus the newNAudio.Effects(inNAudio.Core),NAudio.Sampler,NAudio.Vst3,NAudio.AlsaandNAudio.SoundFile. TheNAudiometa-package still pulls the Windows stack together so existing consumers see no change. SeeDocs/Architecture/NAudio3AssemblyLayoutPlan.mdNAudio.Core,NAudio.MidiandNAudio.Wasapiare Native-AOT compatible (IsAotCompatible=true), enforced in CI byNAudioAotSmokeTest.NAudio.Midi,NAudio.Effects,NAudio.SamplerandNAudio.SoundFileare cross-platform
New capabilities
Each new subsystem has its own tutorial/README; only the headline is listed here.
- Audio effects — a cross-platform
NAudio.Effectsframework:IAudioEffect/EffectSampleProvider/EffectChainwith click-free bypass, dry/wet mix and an optional parameter model, plus a broad effect set (EQ and filtering, dynamics, saturation/lo-fi, delay and modulation, reverb including FFT convolution, pitch shifting, and voice-comms AGC/noise-suppression). See Docs/AudioEffects.md - Software sampler — new
NAudio.Samplerpackage: polyphonic, cross-platform playback of SoundFont (.sf2) and SFZ instruments and single-sample instruments, rendered as anISampleProvider(SF2 modulator engine, DAHDSR envelopes, LFOs, modulated filters, reverb/chorus sends, voice stealing, choke groups). See Docs/Sampler.md - VST 3 hosting (preview) — new
NAudio.Vst3package (Windows-only): discover, load and host VST 3 effects and instruments, with parameters, state and.vstpresetpresets, native editor windows, program lists/units, latency compensation, and live/offline MIDI-file playback through the shared MIDI pipeline. See theNAudio.Vst3README andDocs/Architecture/Vst3Hosting.md. VST is a registered trademark of Steinberg Media Technologies GmbH - Cross-platform audio files — new
NAudio.SoundFilepackage: read and write WAV/AIFF/FLAC/Ogg-Vorbis/Opus/MP3 via a system libsndfile on Windows, Linux and macOS (the first cross-platform FLAC/Vorbis/Opus encoder in NAudio). See Docs/CrossPlatformAudioFilesWithSoundFile.md (#1289) - Linux audio — new
NAudio.Alsapackage:AlsaOut(IWavePlayer) andAlsaIn(IWaveIn) plusAlsaDeviceEnumerator, backed bylibasound. See Docs/PlayAudioFileLinuxAlsa.md and Docs/RecordAudioFileLinuxAlsa.md (#1182) - Sequencing — a portable
NAudio.Sequencingnamespace inNAudio.Core(tempo and time-signature maps, transport,EventTimeline, swing, and a sample-accurate per-buffer dispatcher) underpinning MIDI-file playback and the sampler. SeeDocs/Architecture/Sequencing.md - Modern WASAPI and ASIO — high-level
WasapiPlayer/WasapiRecorder(built viaWasapiPlayerBuilder/WasapiRecorderBuilder:IAudioClient3low-latency, MMCSS,IAsyncDisposable, zero-copy buffers, process-loopback capture, default-device automatic stream routing viaWithDefaultDeviceStreamRouting()+BuildAsync()so playback/capture follows the default endpoint and re-routes when it changes (Windows 10 1607+, #942), acoustic-echo-cancellation reference control viaWithEchoCancellationReferenceEndpoint/IAcousticEchoCancellationControl(Windows 11 build 22621+, #1223) and aWithCommunicationsModecapture option that engages the system AEC/noise-suppression/AGC pipeline (also fixingWasapiPlayerBuilder.WithCategory, which previously did not apply the stream category), automatic resample-free format adaptation — bit depth and channels — in exclusive and low-latency modes,WasapiPlayer.GetPlaybackCapabilityto validate options up front, andLowLatencyActive/WithLowLatency(required)to control and inspect low-latency fallback on bothWasapiPlayerandWasapiRecorder(recorder low-latency capture added in #1100)), and a newAsioDevicereplacingAsioOut(explicit playback/recording/duplex modes, non-contiguous channels, per-channelSpan<float>callbacks, driver-reset recovery, per-buffer timing). See Docs/WasapiPlayer.md, Docs/WasapiRecorder.md and Docs/AsioMigration.md - MIDI —
NAudio.Midiis now cross-platform; new WinRTWinRTMidiIn/WinRTMidiOut(inNAudio.Wasapi) and backend-agnosticIMidiInput/IMidiOutput; a newIMidiInstrumentseam withMidiFileSequence/SequencedMidiPlayer/OfflineMidiRenderer/LiveMidiInstrumentgives an end-to-end MIDI-file → audio pipeline that drives the sampler or a hosted VST 3 instrument.MidiFilenow also reads RIFF-RMID (.rmi) files (#1236) - WaveFormatExtensible — new constructors let you set the SubFormat (or just choose PCM vs IEEE float via a
useIeeeFloatflag), valid-bits-per-sample and channel mask explicitly (e.g. 32-bit integer PCM, or 24 valid bits in a 32-bit container), andValidBitsPerSample/ChannelMaskare now readable; a new[Flags] Speakersenum names the standard speaker positions for building channel masks (#1325) - WASAPI sessions —
AudioSessionControl.SetDuckingPreference(bool)exposesIAudioSessionControl2::SetDuckingPreference, so a communications session can opt out of the system's auto-ducking of other audio streams (#760) - Sample providers / DSP — new
ChannelMixerSampleProviderwith ready-madeChannelMixMatrixroutings (mono↔stereo, stereo→5.1, …), thanks to @antiduh (#982); a newFftProcessor, anIWaveChunkInterpreter<T>extension point (cue lists, BWFbext, LIST/INFO),Span<T>overloads across the codec/DSP surface, and reusable building blocks (EnvelopeFollower,DelayLine,Lfo,Oversampler,LinkwitzRileyCrossover,PartitionedConvolver, …) underpinning the effects and sampler;SmbPitchShiftingSampleProvidernow exposes its phase-vocoder latency (Latency/LatencySamples/LatencySamplesPerChannel) so shifted audio can be time-aligned with unshifted audio (#922)
Breaking changes
The full upgrade walkthrough — every breaking change with before/after code — is
in Migrating from NAudio 2 to NAudio 3. Most
apps need only re-target to net9.0 and adjust custom providers to the new
Span<T> Read signature. The highest-impact changes:
- Minimum target framework is now
net9.0(legacy .NET Framework / .NET Standard 2.0 dropped) IWaveProvider.Read/ISampleProvider.Readnow take a singleSpan<byte>/Span<float>(was buffer/offset/count) — callers migrate viasource.Read(buffer.AsSpan(offset, count)); implementations override the span methodWasapiOut,WasapiCaptureandWasapiLoopbackCaptureare[Obsolete]in favour ofWasapiPlayer/WasapiRecorder(the legacy types still ship and work);WasapiOut's embedded exclusive-mode resampler was removed, but it now adapts bit depth and channels (PCM↔float, mono↔stereo) in exclusive mode, so only a sample-rate mismatch requires upstream resamplingWasapiRecorderBuilder.WithProcessLoopback(processId, mode)now captures audio rendered by a specific process (and optionally its child processes) viaActivateAudioInterfaceAsync— build it with the newBuildAsync()(Windows 10 2004 / build 19041+)WaveOut/WaveInnow default to event-driven callbacks; the window-based variants are renamedWaveOutWindow/WaveInWindowinNAudio.WinForms- Some types moved package/namespace as part of the split — classic Windows MIDI I/O and
winmmtypes toNAudio.WinMM; the DMO/DirectSound types into the newNAudio.Dmopackage; plus smaller moves (AudioVolumeLevel,CaptureState,DmoMp3FrameDecompressor). Meta-package consumers are unaffected SimpleCompressorStream,ImpulseResponseConvolutionandNAudio.Extras.Equalizerwere removed — superseded byNAudio.Effects(CompressorEffect,ConvolutionReverbEffect,Equalizer)
Notable bug fixes
In addition to the fixes below, the new sampler/SFZ/SoundFont subsystem saw extensive correctness work during development — see Docs/Sampler.md.
WaveOut: fixed a race where stopping/disposing faster than the buffer latency could throw aNullReferenceExceptionviaPlaybackStopped(#804)WaveFileWriter: removed the finalizer that fired an unconditionalDebug.Assertand could crash the process on the finalizer thread when construction had thrownWaveFileWriter.WriteSample/WriteSamples: fixed 32-bitWaveFormatExtensibleoutput writing near-silence or corrupt data —WriteSample(float)truncated the normalised float to anInt32before scaling (writing zero for almost every sample), and both paths ignored the format's SubFormat; they now write IEEE-float or integer-PCM samples according to the declared subformat (#651)WaveExtensionMethods.AsStandardWaveFormat: now also resolves the SubFormat of aWaveFormatExtraData(how an extensible format read from a file/stream is materialised), not just aWaveFormatExtensibleAudioClient.Disposeis now idempotent and safe against concurrent/re-entrant disposal, fixing an intermittent interopNullReferenceException(#1183)AcmInterop: serialised allmsacm32P/Invokes process-wide, fixing process-killing access violations under concurrent ACM useWaveFileReader/AiffFileReader: malformed headers declaringBlockAlign=0now throwInvalidDataExceptionfrom the constructor instead ofDivideByZeroExceptionlater (#1254);WaveFileReaderno longer throws on an oversizedfmtcbSize(#482)WaveFileReader: adatachunk declaring a bogus/oversized length (e.g. FFmpeg's0xFFFF1000placeholder when writing to a non-seekable pipe) is now clamped to the bytes actually present, so reading from aMemoryStreamno longer throws and the reported length reflects the available audio (#1090)WaveFormat.Serialize: PCM formats now write the canonical 16-bytefmtchunk (#934, #1098)WaveViewer: fixed rendering upside-down (#801, #818) and now renders any source format correctly viaToSampleProvider()(#564)ToSampleProvider()now handlesWAVE_FORMAT_EXTENSIBLEPCM and IEEE float sources (e.g. multichannel / >16-bit WAV files) instead of throwingUnsupported source encoding(#639)AudioSessionControl: now supports multiple registered event clients without leaking, andUnRegisterEventClienthonours its argument (#1263)MMDevice.Disposenow releases the device's property store deterministically (PropertyStoreis nowIDisposable), instead of leaving it to be reclaimed by COM finalization (#1145)AudioEndpointVolume.OnVolumeNotification: fixed per-channel notifications all returning channel 0's volume (#351)CueListInterpreter: WAV files with cue points but no labels now return cues with empty labels instead of null (#549)ResamplerDmoStream: fixed an infinite loop onReadafter seeking and the loss of the resampler tail at end-of-stream (#607, #608)LoopStream.Read: no longer spins at 100% CPU when the wrapped source can't satisfy a read (#1338)Mp3FileReader: fixed false sample-rate-change errors near end of file, and more robust MP3 frame parsing against album art / trailing metadataMidiFile: preserve running-status across meta events (fixes "Read too far")BlockAlignReductionStream.Position: validates the incoming value, so a block-aligned seek after an arbitrary read no longer wrongly throws (#368)BlockAlignReductionStream.Read: a single read (orStream.CopyTochunk) larger than the 4-second internal buffer no longer silently discards the rest of the source and truncates the stream — e.g. converting a non-PCM WAV viaAudioFileReaderon .NET Core (#1022)MmExceptionmessages now append a human-readableMmResultdescription (#1192);Id3v2Tag.ReadTagno longer throws/catches for tagless MP3 streams (#265)- ASIO: implemented missing
Asio64BitInt24LSB/Float32LSB conversions and fixed a byte-order bug inGetSamplePosition;WdlResamplerbackported three upstream Cockos WDL fixes - Hardened Media Foundation and DMO interop against COM ref leaks on error paths (
MediaFoundationReader,MediaFoundationEncoder,MediaFoundationTransform,MediaBuffer,Mf*wrappers) (#1293) - Removed dead
naudio.codeplex.comlinks from the README, MixDiff and source comments (#985)
Performance
- Vectorised mix-add and volume kernels via
System.Numerics.Tensors(significantly faster on AVX2) WaveStream.Read(Span<byte>)is overridden directly on every concrete reader (no intermediate byte-array copy);WasapiCapture's path is now zero-copy via the native WASAPI buffer span- Eliminated per-
Readallocations inSmbPitchShiftingSampleProvider,ResamplerDmoStreamandDmoMp3FrameDecompressor(#971) Mp3FileReaderbuilds its table-of-contents lazily on first seek; thePositionsetter no longer blocks and rapid scrub seeks debounce- The sampler and sequencer render allocation-free and lock-free on the audio thread (control-rate envelope/LFO advancement, indexed region lookup, copy-on-write event timelines)
Tooling, packaging and modernisation
- Most COM interop migrated from
[ComImport]to[GeneratedComInterface]/ComWrappers, and many P/Invokes to[LibraryImport], across the WASAPI/Core Audio activation chain, Media Foundation, the DMO interfaces, DirectSound and theComStreamCCW - Codebase-wide code-style sweep (file-scoped namespaces, target-typed
new, string interpolation, …) now enforced at build time via.editorconfig/.globalconfig; added.git-blame-ignore-revsso the mechanical commits don't obscuregit blame - Each NAudio package now ships its own README and embeds an SPDX 2.2 SBOM under
/_manifest/spdx_2.2/in its.nupkg, and carries per-package<Description>metadata - Tests migrated from VSTest to
Microsoft.Testing.Platform, andNAudioTestssplit into cross-platformNAudio.Core.Testsand Windows-onlyNAudio.Windows.Tests; migrated to the.slnxsolution format; renamedlicense.txttoLICENSE - Added a DocFX documentation site (tutorials + API reference) published to GitHub Pages, built from
Docs/and the source XML comments
Demos and test harnesses
- New WPF demo modules for the new subsystems: Convolution Reverb, managed Realtime Effects, VST3 Realtime Effects, VST3 Realtime Instrument, VST3 MIDI File Player, a Live MIDI Sampler and a Single-Sample Editor
- New
NAudioConsoleTestCLI harness (run-batchfor JSON test plans,diagnosefor a structured host-audio snapshot) andMfStressTestfor the new Media Foundation interop - WPF demos: spectrum analyser rewritten (correct dB/log-frequency/calibration), new
LiveWaveformControl, loopback + multi-API device selection in the WAV recording demo, and a drum machine rebuilt on the newNAudio.Sequencingprimitives - Replaced the deprecated vendored NSpeex with Opus (Concentus) in the network chat demo
- Modernised the network chat demo: now UDP-only (dropped the unsuitable TCP transport), receivers bind to
IPAddress.Anyso it works across machines (not just loopback — #821), separate listen/remote ports for one-PC experiments, async cancellable sockets, a bounded jitter buffer, capture/playback moved toWasapiRecorder/WasapiPlayer, and a new tutorial
.NET 9.0
- NAudio.Core (>= 3.0.0-preview.15)
| Version | Downloads | Last updated |
|---|---|---|
| 3.0.0-preview.18 | 2 | 07/18/2026 |
| 3.0.0-preview.17 | 1 | 07/13/2026 |
| 3.0.0-preview.16 | 5 | 07/01/2026 |
| 3.0.0-preview.15 | 3 | 07/01/2026 |
| 3.0.0-preview.14 | 5 | 06/26/2026 |
| 3.0.0-preview.10 | 11 | 06/10/2026 |
| 3.0.0-preview.9 | 14 | 05/30/2026 |
| 3.0.0-preview.8 | 14 | 05/30/2026 |
| 3.0.0-preview.7 | 13 | 05/30/2026 |
| 3.0.0-preview.6 | 10 | 05/30/2026 |
| 3.0.0-preview.5 | 14 | 05/30/2026 |
| 3.0.0-preview.4 | 12 | 05/30/2026 |
| 3.0.0-preview.3 | 11 | 05/30/2026 |
| 3.0.0-preview.2 | 12 | 05/30/2026 |
| 2.3.0 | 13 | 05/30/2026 |
| 2.2.1 | 12 | 05/30/2026 |
| 2.2.0 | 10 | 05/30/2026 |
| 2.1.0 | 11 | 05/30/2026 |
| 2.1.0-beta.1 | 13 | 05/30/2026 |
| 2.0.0 | 13 | 05/30/2026 |
| 2.0.0-beta2 | 13 | 05/30/2026 |
| 2.0.0-beta1 | 13 | 05/30/2026 |