Skip to main content
.NETStandard2.0

Small pw-play-backed PipeWire playback library for NAudio on Linux.

Published
Apr 3, 2026
6mo ago
Total Downloads
269
269

Install

dotnet add package NAudio.PipeWirePlay --version 0.0.1
ProductVersions
.NET Standard
netstandard2.0

README

NAudio.PipeWirePlay

Small pw-play-backed playback library for NAudio on Linux/PipeWire.

This repo intentionally stays narrow:

  • device discovery via pw-dump
  • playback via pw-play --raw
  • NAudio.Core-compatible output surface

It is not trying to be a full PipeWire binding.

Why

NAudio has useful core abstractions such as IWaveProvider, WaveFormat, and IWavePlayer, but it does not currently ship a first-party PipeWire output backend.

This project keeps the NAudio-facing API small and uses PipeWire's own pw-play tool as the actual sink.

Requirements

  • Linux
  • PipeWire tools available in PATH
    • pw-play
    • pw-dump

Projects

  • src/NAudio.PipeWirePlay
    • library targeting netstandard2.0
  • samples/NAudio.PipeWirePlay.Sample
    • simple console sample

Basic usage

using NAudio.Wave;
using NAudio.PipeWirePlay;

var player = new PwPlayWavePlayer();
player.Init(new SineWaveProvider(440, TimeSpan.FromSeconds(2)));
player.Play();

Discovery

var sinks = await PipeWireDiscovery.ListPlaybackNodesAsync();
foreach (var sink in sinks)
{
    Console.WriteLine($"{sink.Id} {sink.Name} {sink.Description}");
}

Notes

  • Pause() currently behaves like Stop(). pw-play is a simple process sink, so true pause/resume is out of scope for this first version.
  • Playback writes raw PCM to pw-play over stdin. If the producer gets ahead of realtime, PipeWire/backpressure will block the writer instead of accelerating playback.
  • Supported raw formats in this implementation:
    • PCM 8-bit unsigned
    • PCM 16-bit signed
    • PCM 32-bit signed
    • IEEE float 32-bit
    • IEEE float 64-bit

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.