---
title: "Choosing a C# audio library"
url: https://recursiveai.org/oneaudio/articles/csharp-audio-library/
description: "C# audio libraries compared: NAudio 3, OwnAudioSharp, FFMpegCore, CSCore and OneAudio, by playback, recording, codecs and native code, each fact sourced."
date: 2026-10-26
author: OneAudio team
---

# Choosing a C# audio library

C# audio libraries compared: NAudio 3, OwnAudioSharp, FFMpegCore, CSCore and OneAudio, by playback, recording, codecs and native code, each fact sourced.

October 26, 2026 · OneAudio team · Updated · October 27, 2026

Pick a C# audio library by the job first. To decode, convert, resample, mix, measure, play and record audio from managed code on Windows, Linux and macOS, with no native libraries to ship, use OneAudio: the core package reads WAV, MP3, Ogg Vorbis, Opus and FLAC and writes WAV, FLAC and Opus, and its companion package plays and records through WASAPI, Core Audio and ALSA. For the deepest Windows device support (ASIO, WinMM) plus MIDI and VST 3 hosting, use NAudio 3. OwnAudioSharp is a desktop audio engine built on a native Rust core. For formats and video that only FFmpeg handles, use an FFmpeg wrapper such as FFMpegCore. The facts below come from each project’s own NuGet listing, README or documentation, read on October 26 and 27, 2026.

## C# audio libraries at a glance

| Library, version, license | Play and record | Decode | Encode | Native code |
|---|---|---|---|---|
| [OneAudio](https://www.nuget.org/packages/RecursiveAI.OneAudio/1.2.1) 1.2.1 and [OneAudio.Devices](https://www.nuget.org/packages/RecursiveAI.OneAudio.Devices/1.2.1) 1.2.1, MIT OR Apache-2.0 | Windows (WASAPI), macOS and iOS (Core Audio), Linux (ALSA), with the Devices package | WAV and RF64, MP3, Ogg Vorbis, Opus, FLAC | WAV and RF64, FLAC, Ogg Opus | None shipped: two managed assemblies. Devices calls the operating system’s own audio API |
| [NAudio](https://www.nuget.org/packages/NAudio/3.3.0) 3.3.0, MIT | Windows (WASAPI, WinMM, ASIO); Linux with NAudio.Alsa; macOS with NAudio.MacOS (prerelease) | WAV and AIFF everywhere; MP3, AAC, WMA, FLAC through Media Foundation on Windows; WAV, AIFF, FLAC, Ogg Vorbis, Opus, MP3 through NAudio.SoundFile | WAV and AIFF; MP3, AAC, WMA through Media Foundation on Windows; FLAC, Ogg Vorbis, Opus, MP3 through NAudio.SoundFile | Windows APIs; libasound on Linux; a system libsndfile for NAudio.SoundFile |
| [OwnAudioSharp](https://www.nuget.org/packages/OwnAudioSharp/4.0.10) 4.0.10, MIT | Windows, Linux, macOS | WAV, MP3, FLAC, Ogg Vorbis, AAC/M4A, ALAC/M4A, AIFF | WAV | A Rust engine, shipped in the package for six runtimes |
| [FFMpegCore](https://www.nuget.org/packages/FFMpegCore/5.5.0) 5.5.0, MIT | Not documented | What your ffmpeg build reads | What your ffmpeg build writes | The ffmpeg and ffprobe programs, installed separately |

Sources: NAudio’s [package README](https://www.nuget.org/packages/NAudio/3.3.0), its guides to [NAudio.SoundFile](https://github.com/naudio/NAudio/blob/main/Docs/CrossPlatformAudioFilesWithSoundFile.md) and [MediaFoundationEncoder](https://github.com/naudio/NAudio/blob/main/Docs/MediaFoundationEncoder.md), and the [NAudio.MacOS](https://www.nuget.org/packages/NAudio.MacOS) listing (3.4.0-preview.1, prerelease only). OwnAudioSharp’s [README](https://www.nuget.org/packages/OwnAudioSharp/4.0.10); its native libraries (`libownaudio_ffi` for Windows, Linux and macOS on x64 and Arm64) are listed from the published package. FFMpegCore’s [README](https://www.nuget.org/packages/FFMpegCore/5.5.0), whose “Binaries” section explains how to install ffmpeg. OneAudio’s [README](https://github.com/recursive-ai-oss/oneaudio-csharp/blob/v1.2.1/README.md) and the Devices package’s [NuGet listing](https://www.nuget.org/packages/RecursiveAI.OneAudio.Devices/1.2.1).

## What each library is for

### NAudio

NAudio is the most downloaded of these packages, with 14.9 million downloads on NuGet, and version 3 changed what it covers. In his [release post](https://markheath.net/post/2026/8/15/naudio-3-release) (August 15, 2026), Mark Heath writes that NAudio “is no longer Windows-only”: the Windows-only features moved to their own assemblies, `NAudio.Core` and `NAudio.Midi` are cross-platform, and `NAudio.Alsa` plays and records on Linux. It also gained managed effects, VST 3 hosting, a sampler and sequencer, and SoundFont support. NAudio 3 needs `net9.0` or later; for .NET Framework and .NET Standard 2.0 the README points to NAudio 2.x.

What still depends on the platform is codecs. On Windows, NAudio reads and writes MP3, AAC and WMA through Media Foundation. Elsewhere, compressed formats go through `NAudio.SoundFile`, which needs libsndfile installed on the machine. If you need ASIO, NAudio is the one here that has it; MIDI and VST 3 hosting are in NAudio and OwnAudioSharp.

### OwnAudioSharp

A full audio engine for desktop apps: playback, recording, multi-track mixing, effects, VST3 hosting and MIDI, with decoding by the Rust Symphonia library, according to its README. The full package depends on Avalonia and Microsoft.ML.OnnxRuntime for its display and analysis features; `OwnAudioSharp.Basic` is the playback and recording edition.

### FFmpeg wrappers

FFMpegCore runs the ffmpeg and ffprobe command-line programs for you. It reaches every format and codec your ffmpeg build has, video included, at the cost of installing and shipping ffmpeg alongside your app and running it as a separate process. When a managed library covers the job instead is the subject of [audio in .NET without FFmpeg](https://recursiveai.org/oneaudio/articles/audio-without-ffmpeg-dotnet/).

### CSCore

CSCore still appears in searches for a C# audio library. Its last NuGet release, [1.2.1.2](https://www.nuget.org/packages/CSCore/1.2.1.2), is from October 22, 2017, and its license is the [Microsoft Public License](https://github.com/filoe/cscore/blob/master/license.md).

### OneAudio

OneAudio handles audio from file to speaker: decoding, encoding, resampling, mixing and loudness in the `RecursiveAI.OneAudio` package, and playback and recording in `RecursiveAI.OneAudio.Devices`, both in C# with no dependency beyond .NET. The codecs are written from their specifications and checked against outside references, as the README’s conformance table shows: FLAC decoding is bit-exact on the 64 files of the IETF test suite’s subset, all 12 RFC 8251 Opus vectors pass, and all 11 ISO MP3 compliance streams decode within the standard’s full-accuracy limits.

*Program.cs · OneAudio 1.2.1 · .NET 10*

```
using OneAudio;
 
// Decode an MP3, convert it to 48 kHz, normalize it to -14 LUFS (true peak at most -1 dBTP)
// and write it as FLAC: one call, streamed, no native code.
NormalizeResult result = Audio.Normalize("music.mp3", "music-48k.flac", new NormalizeOptions
{
    Output = new TranscodeOptions { SampleRate = 48000 },
});
Console.WriteLine($"was {result.Before.IntegratedLufs:F1} LUFS, applied {result.GainDb:+0.0;-0.0} dB");
 
var after = Audio.Measure("music-48k.flac");
Console.WriteLine($"music-48k.flac: {after.IntegratedLufs:F1} LUFS, {after.TruePeakDbtp:F1} dBTP");
```

*Output · Console*

```
was -14.3 LUFS, applied +0.3 dB
music-48k.flac: -14.0 LUFS, -4.8 dBTP
```

Playing it takes the second package and three lines. The device package opens the default output, follows the system default when it changes, reopens a lost device, and reports what the hardware did from the device’s own clock:

*Program.cs · OneAudio.Devices 1.2.1 · .NET 10*

```
using OneAudio;
using OneAudio.Devices;
 
// Playback: the mixer renders, the device package sends it to the default output (WASAPI, Core Audio or ALSA).
AudioMixer mixer = Audio.CreateMixer();
using AudioOutputDevice output = Audio.Play(mixer);
using StreamingVoice song = mixer.PlayStream("intro.mp3");
 
Thread.Sleep(5500);
DeviceCounters c = output.Counters;
Console.WriteLine($"{output.BackendName}: {c.FramesPlayed} frames played, {c.Underruns} underruns");
```

*Output · Console · Linux*

```
alsa: 265409 frames played, 0 underruns
```

- **No native code shipped:** two managed assemblies, so `dotnet publish` for any runtime needs nothing else. The device package reaches the hardware through the operating system’s own audio API: WASAPI on Windows, Core Audio on macOS and iOS, and libasound on Linux, which is how PipeWire and PulseAudio desktops are reached too. The test suite runs on Windows x64, Linux x64 and Arm64, and macOS Arm64.
- **Where the device code has been checked:** per the [changelog](https://github.com/recursive-ai-oss/oneaudio-csharp/blob/v1.2.1/CHANGELOG.md), ALSA playback and capture on Linux, Core Audio playback on macOS and on an iPad, on real hardware; the WASAPI backend by unit tests and on Windows CI. The samples on this site were run on Linux through PipeWire.
- **Trimming and NativeAOT:** a small NativeAOT app that loads WAV, resamples, measures loudness and mixes is 1.96 MB on linux-x64 with every decoder, and 1.45 MB when it registers only WAV, per the README.
- **Real-time safe mixing:** the mixer has voices, buses, ducking, filters, reverb and a limiter, and its render call allocates nothing and takes no locks. In the README’s benchmark, mixing 256 stereo voices took 71.0 µs per 1,024-frame block. See [a zero-allocation audio mixer for C# games](https://recursiveai.org/oneaudio/articles/game-audio-mixer-csharp/).
- **Loudness:** an EBU R 128 meter with true peak and one-call normalization. See [loudness normalization in C#](https://recursiveai.org/oneaudio/articles/loudness-normalization-csharp/).
- **Not included:** MP3, AAC and Vorbis encoding, AAC decoding, ASIO, MIDI and spatial audio.

## Which one to use

- **A server or batch job that reads, converts or analyzes audio:** OneAudio. Nothing to install on the server, no native library that differs by OS, and memory that doesn’t grow with file length.
- **An app that plays and records on Windows, Linux and macOS:** OneAudio with the Devices package when you also want its decoders, mixer or loudness meter in the same process, with nothing native to ship. See [play audio in C#](https://recursiveai.org/oneaudio/articles/play-audio-csharp/) and [record audio in C#](https://recursiveai.org/oneaudio/articles/record-audio-csharp/). NAudio 3 when you need ASIO, WinMM, MIDI or VST 3 hosting. OwnAudioSharp when its desktop engine and UI pieces fit your app.
- **A game:** OneAudio’s mixer, played with `Audio.Play(mixer)` or rendered into the buffer your engine’s audio output asks for, without allocating. See [the game audio mixer article](https://recursiveai.org/oneaudio/articles/game-audio-mixer-csharp/).
- **Already on NAudio:** move file and signal code to OneAudio and keep NAudio’s player through an `ISampleProvider`, or move playback too, as shown in [migrating from NAudio](https://recursiveai.org/oneaudio/articles/migrate-from-naudio/#playback).
- **AAC, M4A, MP3 encoding or video:** FFmpeg, through FFMpegCore, or Media Foundation through NAudio on Windows.

## Where next

- [Getting started with OneAudio](https://recursiveai.org/oneaudio/docs/getting-started/).
- [Decode MP3 in C#](https://recursiveai.org/oneaudio/articles/decode-mp3-csharp/), [read and write FLAC](https://recursiveai.org/oneaudio/articles/flac-csharp/), [encode and decode Opus](https://recursiveai.org/oneaudio/articles/opus-csharp/) and [resample audio](https://recursiveai.org/oneaudio/articles/resample-audio-csharp/).
- The [OneAudio cookbook](https://recursiveai.org/oneaudio/cookbook/): FLAC, Opus, WAV, streaming, mixing, devices and loudness recipes.
