Cross-platform audio engine library for desktop platforms (Windows, Linux, macOS)
$ dotnet add package OwnAudioSharpOwnAudio is a platform-independent C# audio library that provides a high-level API for audio playback, recording, and processing. By default, it uses Miniaudio for audio I/O. If FFmpeg or PortAudio is installed, it automatically uses Portaudio and FFmpeg. This way, it can work with MiniAudio without any external dependencies. The implementation of MiniAudio also allowed the API to be used on mobile platforms. It is possible to manipulate audio data in real time (pitch change, tempo change, and various real-time effects). The API is able to detect musical chords from audio and create a timed list of chords. A feature has been built in to help game developers manage sound effects.
Studio-grade mastering with advanced AI-driven analysis - single line of code!
// Process source audio to match reference characteristics
analyzer.ProcessEQMatching("source.wav", "reference.wav", "mastered.wav");
// Optimize for different playback systems
analyzer.ProcessWithPreset("source.wav", "hifi_output.wav", PlaybackSystem.HiFiSpeakers);
⚡ What you get:
🎯 Result: Your source audio will sound exactly like the reference track - professional mastering studio quality.
If you find the code useful or use it for commercial purposes, invite me for a coffee!
Here's a quick example of how to use OwnAudio to play an audio file:
using Ownaudio;
using Ownaudio.Sources;
using System;
using System.Threading.Tasks;
try
{
// Initialize OwnAudio
OwnAudio.Initialize();
// Create a source manager
var sourceManager = SourceManager.Instance;
// Add an audio file
await sourceManager.AddOutputSource("path/to/audio.mp3");
// Play the audio
sourceManager.Play();
// Wait for the audio to finish
Console.WriteLine("Press any key to stop playback...");
Console.ReadKey();
// Stop playback and clean up
sourceManager.Stop();
}
catch (Exception ex)
{
Console.WriteLine($"Audio error: {ex.Message}");
}
finally
{
OwnAudio.Free();
}Special thanks to the creators of the following repositories, whose code was instrumental in the development of OwnAudio: