Install
dotnet add package NAudio.PipeWirePlay --version 0.0.1
| Product | Versions |
|---|---|
| .NET Standard |
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
PATHpw-playpw-dump
Projects
src/NAudio.PipeWirePlay- library targeting
netstandard2.0
- library targeting
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 likeStop().pw-playis a simple process sink, so true pause/resume is out of scope for this first version.- Playback writes raw PCM to
pw-playoverstdin. 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.