OwnAudioSharp is a professional-grade, cross-platform audio API for C# — with something no other .NET audio library has: from the first sample to the last byte, your audio is processed by a purpose-built Rust engine. You write 100% C#; Rust does the heavy lifting.
The entire audio path — decoding, mixing, effects, resampling, playback and capture — runs in a native Rust core that was written specifically for this package. On top of it sits a clean, idiomatic C# surface. The result: low CPU usage and a small memory footprint — engineered to industry standards for professional, production-ready use.
- 🦀 Rust engine, C# surface — native performance with a managed developer experience.
- 🎯 Rock-solid real-time path — no dropouts, no glitches.
- 📦 Zero external dependencies — one NuGet package, native code bundled and built for it.
- ⚡ Low CPU & memory — real-time headroom on desktop and mobile alike.
- 🌍 Truly cross-platform — Windows, macOS, Linux, Android and iOS from a single API.
Nothing like it exists for C# today.
Decoding is pure Rust too — no external codecs, no FFmpeg, no system dependencies. The built-in decoder handles MP3, FLAC, WAV (PCM/ADPCM), AAC, ALAC, MP4/M4A, OGG/Vorbis and AIFF out of the box, on every platform.
| Category | Capability |
|---|---|
| Playback & Mixing | Multi-track sync, real-time tempo/pitch, per-track volume |
| Recording | Low-latency capture with device selection |
| Effects | 15 real-time DSP effects (reverb, EQ, compressor, limiter, …) |
| Plugins | VST3 effect plugins with cross-platform editor GUI |
| MIDI | Hardware I/O, SMF file read/write, hardware-accurate clock |
| Network | Sample-accurate multi-device sync over LAN |
| Mastering | Reference-based mastering (Audio Matchering) |
| Analysis | Real-time chord detection |
| Calibration | SmartMaster speaker calibration with automatic EQ correction |
Recommended for: music players and DAWs, DJ software, music-education tools, broadcast and podcast pipelines, live-performance apps, and low-latency game audio.
dotnet add package OwnAudioSharp # Desktop — everything
dotnet add package OwnAudioSharp.Mobile # Android / iOS
dotnet add package OwnAudioSharp.Basic # Desktop — minimal engine| Package | Platforms | What it is |
|---|---|---|
OwnAudioSharp |
Windows, Linux, macOS | The complete edition. Playback, recording, mixing, effects, VST3 and MIDI, plus the analysis features (chord detection, note transcription, matchering) and the waveform display. |
OwnAudioSharp.Mobile |
Android, iOS | The same feature set built for mobile, including matchering and the waveform display — minus the ONNX-based analysis (no chord detection, no note transcription). |
OwnAudioSharp.Basic |
Windows, Linux, macOS | Audio in and out, and nothing that could be left out. Playback, recording, mixing, effects and VST3 — no analysis features, no ONNX models, no UI dependency. |
Requirement: .NET 10.0 or later. The native Rust engine — including the audio decoder — is bundled in the package. There is nothing else to install and no external codecs to configure.
If you consume OwnAudioSharp.Mobile from NuGet, there is nothing to configure. The package
carries the native engine for every Android ABI and both iOS architectures, and the SDK puts
them into your APK or app bundle on its own — the JNI handshake Android needs for device
enumeration is done by the library at startup.
| Minimum | Notes | |
|---|---|---|
| Android | 7.0 (API 24) | arm64-v8a, armeabi-v7a, x86_64. Audio runs on AAudio. |
| iOS | 12.2 | Device and simulator, arm64 + x64. The engine is linked statically. |
Add RECORD_AUDIO to your manifest if you capture audio; playback needs no permission.
Building this repository from source is different — -p:BuildMobile=true is mandatory:
dotnet build YourApp.csproj -c Debug -p:BuildMobile=true
dotnet publish YourApp.csproj -c Release -p:BuildMobile=trueThe engine projects only expose their net10.0-android and net10.0-ios target frameworks when
that property is set. Leave it off and everything still builds — your app quietly links the
desktop net10.0 assemblies instead, installs onto the phone, and then throws on the first
Initialize call:
AudioEngineException: Failed to initialize Rust audio engine:
internal panic in native audio engine: android context was not initialized
The flag has to be on the command line, where it reaches restore as well as build; setting it
inside the project file or through AdditionalProperties on a ProjectReference does not work.
This applies to the samples in OwnAudio/Examples/ too — see the
Android and
iOS sample READMEs.
On iOS add a RuntimeIdentifier as well (ios-arm64, iossimulator-arm64 or
iossimulator-x64): the engine is a static library picked per RID, and no single one covers
device and simulator.
Deploying with -t:Run or -t:Install needs an emulator or a connected device with USB
debugging enabled, otherwise the Android SDK stops with XA0010: No available device. Check
with adb devices first.
Play multiple audio files in perfect sync using a shared central clock. Each track has independent volume, pitch and tempo control — ideal for DAW-style apps or multitrack players.
Adjust playback speed and pitch independently, in real time, across multiple tracks simultaneously.
Reverb, equalizer, compressor, limiter, chorus, delay, distortion and more — freely combinable, inserted per-track or on the master bus.
Load VST3 effect plugins and use their native cross-platform editor GUI, integrated into the effect chain like any built-in effect.
Full guide: OwnAudio/Source/Effects/VST/README.md
Straightforward capture from any input device with configurable sample rate, buffer size and channel count.
Measures your speakers with a microphone and corrects the output automatically. Includes speaker profiles (HiFi, Headphone, Studio, Club, Concert), a 30-band EQ, multiband compression and a brick-wall limiter.
Full guide: OwnAudio/Source/Effects/SmartMaster/README.md
Synchronizes playback across devices on the local network with sample-accurate precision (< 5 ms on LAN). Zero-configuration with automatic server discovery.
Analyzes a reference track and applies its spectral and dynamic characteristics to your audio for professional mastering results.
Full guide: OwnAudio/Source/Features/Matchering/README.md
Recognizes major, minor, diminished, augmented and extended chords (7th–13th) from audio in real time or offline, using a chromagram-based pipeline.
Full guide: OwnAudio/Source/Features/ChorDetect/README.md
Full API reference: OwnAudio/Midi/README.md
AOT-compatible, reflection-free MIDI on Windows (WinMM), macOS (CoreMIDI) and Linux (ALSA rawmidi): real-time input/output, Standard MIDI File (format 0/1) read/write/edit, and a hardware-accurate 24 PPQN clock.
Getting to a truly dependable real-time audio API took four generations — each one solved a problem the last one exposed:
| Version | Approach | What it taught us |
|---|---|---|
| 1.0 | MiniAudio + PortAudio + FFmpeg, no optimization | Proved the core idea and shaped the API — but left performance on the table. |
| 2.0 | Fully managed, cross-platform engine, zero native dependencies | Clean and portable, but managed code alone could not deliver the consistency the real-time audio path demands. |
| 3.0 | Optimized native engines (MiniAudio + PortAudio + FFmpeg); mixing, effects and sync in managed code | Fast — but the managed processing stage could still be stalled by the host application under load. |
| 4.0 | The entire audio chain runs in native Rust; the whole API is wrapped in a thin managed layer | A C# audio API whose real-time path is completely independent of the host application — professional, industry-standard behavior for real-world .NET audio apps. |
4.0 is the payoff: no matter what the surrounding C# code does, the audio never stutters — because not a single sample is processed in managed code.
OwnAudioSharp is a thin C# surface over a native Rust engine:
Application
└─ OwnaudioNet (high-level C# API)
└─ AudioEngineWrapper (lock-free, non-blocking)
└─ Native Rust engine (ownaudio-ffi + ownaudio-core)
└─ Audio hardware
- Ownaudio.Core — platform-agnostic interfaces, lock-free ring buffers, SIMD converters and object pools.
- OwnAudioRust — the C# binding stack over the Rust core, in three layers: HighLevel → Safe → Native.
- Native Rust engine — ownaudio-ffi (the C ABI boundary) wrapping ownaudio-core (decoding, mixing, effects, resampling, playback and capture).
All blocking engine methods (Initialize, Stop, Send) must be called off the UI thread. The high-level OwnaudioNet API handles threading internally.
Complete API reference, tutorials and guides are on the official website:
Working example projects live in OwnAudio/Examples/.
OwnAudioSharp is free and open-source. If it saves you time or ships in your product, consider supporting its development:
Issues and feature requests: GitHub Issues
See the LICENSE file for details.
This project is developed with the following tools:
| Anthropic — Claude Code | |
| Microsoft — Visual Studio Code | |
| Microsoft — Visual Studio 2022 | |
| JetBrains — Rider |