Skip to content

WIP low-level C# bindings for PortAudio.

License

Notifications You must be signed in to change notification settings

horizongir/PortAudio.NET

Repository files navigation

PortAudio.NET

MIT Licensed CI Status NuGet Version

WIP low-level C# bindings for PortAudio.

Currently only Windows x64 is well-tested, although Linux x64 is expected to work if you regenerate the bindings.

Most of PortAudio's host API-specific funcionality is not yet exposed with the exception of WASAPI.

License

This project is licensed under the MIT License. See the license file for details.

Additionally, this project has some third-party dependencies. See the third-party notice listing for details.

Building

Windows Prerequisites

Windows 10 22H2 x64 or later is recommended.

Tool Tested Version
Visual Studio 2022 (17.11.5)
.NET 8.0 SDK 8.0.403
CMake 3.30.2

Visual Studio must have the "Desktop development with C++" workload installed.

Linux Prerequisites

Ubuntu 24.04 Noble x64 is tested, but most distros are expected to work.

Package Tested Version
build-essential 12.10
cmake 3.28.3
dotnet-sdk-8.0 8.0.110

Ubuntu 22.10 and later currently require manually installing libtinfo5, see this issue for details.

Building PortAudio and generating the bindings

  1. Ensure Git submodules are up-to-date with git submodule update --init --recursive
  2. Build and run generate.cmd (Windows) or generate.sh (Linux) from the repository root

Building and running the samples

Simply build+run any of the samples as you would any other .NET project. (IE: Using F5 in Visual Studio or dotnet run --project Samples/ListDevices --framework net8.0.)

The native PortAudio code will be built automatically if you didn't build it yourself.