ZeroAudio.Core
1.1.0
dotnet add package ZeroAudio.Core --version 1.1.0
NuGet\Install-Package ZeroAudio.Core -Version 1.1.0
<PackageReference Include="ZeroAudio.Core" Version="1.1.0" />
<PackageVersion Include="ZeroAudio.Core" Version="1.1.0" />
<PackageReference Include="ZeroAudio.Core" />
paket add ZeroAudio.Core --version 1.1.0
#r "nuget: ZeroAudio.Core, 1.1.0"
#:package ZeroAudio.Core@1.1.0
#addin nuget:?package=ZeroAudio.Core&version=1.1.0
#tool nuget:?package=ZeroAudio.Core&version=1.1.0
๐ต ZeroAudio: Sovereign Pure C# Audio Engineering & DSP Engine
Architectural Standard: 100% Pure C# BCL, Zero External Unmanaged Dependencies (no NAudio, FFmpeg, or BASS DLLs required), Pragmatic Minimal Memory Allocation, Multi-Targeting across
.NET 8.0,.NET Framework 4.6.2, and.NET Standard 2.0.
ZeroAudio is a sovereign, high-throughput audio engineering, digital signal processing (DSP), and streaming engine for .NET. Operating within Tier 3 (Perception & AI) of the ZeroPlatform / Zero Universe ecosystem, it provides pure C# primitives for RIFF/WAVE container encoding/decoding, low-latency SPSC circular ring buffers, multi-channel matrix routing, Catmull-Rom cubic resampling, peak limiting, dynamic compression, biquad equalizers, and waveform synthesis.
๐๏ธ Design Philosophy: Minimal Allocation & Pragmatic Efficiency
Unlike dogmatic zero-allocation frameworks that compromise readability with overly complex pointer gymnastics, ZeroAudio adopts the modern ZeroPlatform Pragmatic Standard:
- Hot-path Zero Allocation: Critical real-time audio sample processing loops (
Span<float>,ReadOnlySpan<byte>) execute without allocating on the managed heap. - Pooled Buffers: Audio memory blocks rent and return memory via
ArrayPool<T>.Sharedto eliminate garbage collector (GC) pauses and audio stuttering (pops and clicks). - Pure C# Sovereignty: Eliminates brittle native C++ wrapper dependencies, enabling immediate cross-platform deployment across Windows, Linux, macOS, and edge IoT devices.
๐ฆ Key Subsystem Capabilities
| Component | Namespace | Description |
|---|---|---|
WavReader & WavWriter |
ZeroAudio.Formats |
Streaming RIFF/WAVE encoder and decoder supporting 8/16/24/32-bit linear PCM and 32-bit IEEE Float with automatic header size finalization. |
AudioBuffer |
ZeroAudio.Buffers |
Pooled, multi-channel float audio frame container with instant RMS, peak dBFS, gain scaling, and channel deinterleaving. |
AudioRingBuffer |
ZeroAudio.Buffers |
Lock-free Single-Producer Single-Consumer (SPSC) circular FIFO buffer with power-of-two bitwise wrapping for real-time soundcard decoupling. |
SampleRateConverter |
ZeroAudio.Processing |
High-speed linear interpolation and 4-point 3rd-order Catmull-Rom cubic Hermite resampling between arbitrary sample rates. |
ChannelMatrix |
ZeroAudio.Processing |
Mono โ Stereo conversion, ITU-R BS.775 5.1 surround-to-stereo downmixing, and channel interleaving / deinterleaving. |
GainController |
ZeroAudio.Processing |
Volume attenuation, constant-power / linear panning, linear fade-in/fade-out ramps, and cubic polynomial soft saturation. |
AudioLimiter |
ZeroAudio.Dynamics |
Instantaneous attack peak limiter preventing digital clipping distortion above specified dBFS ceilings. |
AudioCompressor |
ZeroAudio.Dynamics |
Configurable dynamic range compressor with threshold, ratio, attack, release, and makeup gain. |
NoiseGate |
ZeroAudio.Dynamics |
Fast-attack, hold, and smooth-release noise gate attenuating ambient background noise during speech pauses. |
AgcEngine |
ZeroAudio.Dynamics |
Automatic Gain Control dynamically leveling speech volume toward target RMS dBFS. |
BiquadFilter |
ZeroAudio.Equalization |
Direct Form II Transposed IIR biquad filters: LowPass, HighPass, BandPass, Notch, Peaking EQ, LowShelf, HighShelf. |
GraphicEqualizer |
ZeroAudio.Equalization |
10-band ISO standard equalizer (31Hz to 16kHz) with per-channel cascading biquad filters. |
SignalGenerator |
ZeroAudio.Synthesis |
Pure waveform generators (Sine, Square, Triangle, Sawtooth), White/Pink noise, and telephone DTMF dual-tone generation. |
AudioMixer |
ZeroAudio.Synthesis |
Multi-track weighted audio summing engine with master bus soft saturation. |
๐ Quick Start Examples
1. Reading and Writing WAV Files
using ZeroAudio.Formats;
// Read all samples from a WAV file
float[] samples = WavReader.ReadAllSamples("input.wav", out AudioFormat format);
Console.WriteLine($"Loaded: {format.SampleRate}Hz, {format.Channels} channels, {format.BitsPerSample}-bit");
// Process samples (e.g. increase volume by +3 dB)
GainController.ApplyGainDb(samples, 3.0f);
// Write back to a standard 16-bit PCM WAV file
WavWriter.WriteAllSamples("output.wav", samples, AudioFormat.Pcm16Stereo44kHz);
2. High-Performance AudioBuffer Pooling
using ZeroAudio.Buffers;
using ZeroAudio.Formats;
var format = AudioFormat.Float32Stereo48kHz;
// Rent pooled buffer without heap garbage
using var buffer = AudioBuffer.Rent(format, frameCount: 1024);
// Access raw float span for DSP
Span<float> samples = buffer.Samples;
// Compute audio telemetry
float peakDb = buffer.CalculatePeakDb();
float rms = buffer.CalculateRms();
3. Real-Time Dynamic Processing & Equalization
using ZeroAudio.Dynamics;
using ZeroAudio.Equalization;
// Configure a 10-band Graphic Equalizer
var eq = new GraphicEqualizer(sampleRate: 48000, channels: 2);
eq.SetBandGain(0, +3.0f); // Bass boost (+3dB at 31Hz)
eq.SetBandGain(5, +2.0f); // Presence boost (+2dB at 1kHz)
// Configure Brickwall Limiter (-0.2 dBFS ceiling)
var limiter = new AudioLimiter(sampleRate: 48000, ceilingDb: -0.2f);
// In your audio rendering callback loop:
Span<float> frameBuffer = GetAudioFrame();
eq.Process(frameBuffer);
limiter.Process(frameBuffer);
4. Resampling & Channel Downmixing
using ZeroAudio.Processing;
// Resample 44.1 kHz audio to 48.0 kHz with cubic Hermite interpolation
int outFrames = SampleRateConverter.CalculateOutputFrames(inFrames, 44100, 48000);
Span<float> resampled = stackalloc float[outFrames * 2];
SampleRateConverter.ResampleCubic(inSamples, resampled, channels: 2, 44100, 48000);
// Downmix 5.1 surround to stereo
Span<float> stereoOut = stackalloc float[inFrames * 2];
ChannelMatrix.DownmixSurroundToStereo(surroundSamples, stereoOut);
๐งช Verification & Unit Testing
ZeroAudio is backed by a comprehensive unit test suite covering container round-trips, DSP filter responses, dynamics, and synthesis:
dotnet test -c Release
Passed! - Failed: 0, Passed: 27, Skipped: 0, Total: 27, Duration: 66 ms - ZeroAudio.Tests.dll (net8.0)
Passed! - Failed: 0, Passed: 27, Skipped: 0, Total: 27, Duration: 116 ms - ZeroAudio.Tests.dll (net462)
๐ License
Licensed under the MIT License. Copyright ยฉ 2026 Phong Vรต (kzxl). Part of the ZeroPlatform sovereign ecosystem.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroPrimitives.Core (>= 1.4.1)
-
.NETStandard 2.0
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroPrimitives.Core (>= 1.4.1)
-
net8.0
- ZeroPrimitives.Core (>= 1.4.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ZeroAudio.Core:
| Package | Downloads |
|---|---|
|
ZeroSignal.Core
Pure C# digital signal processing (SciPy equivalent): IIR Butterworth/Chebyshev filter synthesis, zero-phase FiltFilt, DWT wavelets, and Levenberg-Marquardt non-linear least squares optimization for .NET. |
|
|
ZeroAudioVisual
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0 | 569 | 9/29/2026 |