oneaudio articles
Guides to working with oneaudio: how-tos, migrations and comparisons.
-
Read and write WAV files in C#
Read WAV files in C# as floats or exact integers and write 16-bit, 24-bit and float WAV with optional dither, including RF64 for files over 4 GB, on any OS.
-
Record audio in C#
Record from the microphone in C# on Windows, Linux and macOS: write a WAV file while recording, show a live input level, and handle missing devices.
-
Play audio in C#
Play MP3, WAV, Ogg, Opus and FLAC files in C# on Windows, Linux and macOS with one API, pick an output device and play samples you generate.
-
Encode and decode Opus in C#
Encode and decode Opus in C# with managed code: WAV to Ogg Opus files, raw 20 ms voice packets with loss concealment, and a comparison with Concentus.
-
Decode Ogg Vorbis in C#
Decode Ogg Vorbis in C# with managed code on any OS: stream floats, seek to an exact frame, play chained files, convert OGG to WAV, and compare with NVorbis.
-
A zero-allocation audio mixer for C# games
Game audio in C#: a real-time mixer with buses, ducking, reverb and a limiter that allocates nothing on the audio thread, played directly or via MonoGame.
-
Read and write FLAC in C#
Decode and encode FLAC in C# on any OS with managed code: exact integer samples, MD5 verification, tags, WAV to FLAC at levels 0 to 8, and 24-bit output.
-
Audio in .NET without FFmpeg
When you can drop FFmpeg, FFMpegCore or Xabe.FFmpeg for audio in .NET: ffmpeg commands mapped to managed C# calls, and the jobs that still need FFmpeg.
-
Resample audio in C#
Resample audio in C# with pure .NET code on any OS: 44.1 kHz to 48 kHz or 16 kHz, files or float buffers, streaming, with no Media Foundation or native code.
-
Migrating from NAudio
Move NAudio code to OneAudio: AudioFileReader, WdlResamplingSampleProvider, WaveFileWriter, FLAC and Opus encoding, and AlsaOut or WasapiPlayer playback.
-
Loudness normalization in C#
Measure and normalize loudness in C#: integrated LUFS, loudness range and true peak per EBU R 128 and ITU-R BS.1770, to -14 or -23 LUFS, in pure .NET code.
-
Decode MP3 in C#
Decode MP3 files in C# on Windows, Linux and macOS with pure .NET code: float samples, MP3 to WAV on disk or in memory, streaming, seeking and gapless length.
-
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.