Simple .Net Standard Wrapper for ALSA on Unix devices. Supports Audio Playback, Recording and Mixer Devices. Requires libasound2-dev to be installed on target System.
$ dotnet add package Alsa.NetSimple .Net Standard Wrapper for the Advanced Linux Sound Architecture (ASLA).
Make sure to have the following libary installed on your target device:
sudo apt-get install libasound2-dev
var soundDeviceSettings = new SoundDeviceSettings();
using var alsaDevice = AlsaDeviceBuilder.Create(soundDeviceSettings);
alsaDevice.Record(10, "output.wav");
alsaDevice.Play("output.wav");
Ensure to look into the example projects for more details on how to use this package.
Thanks to ZhangGaoxing for the initial work on the ALSA Native Bindings.