Skip to content

Add PipeWire support for Linux - #495

Merged
garyscavone merged 1 commit into
thestk:masterfrom
ERSUCC:master
Nov 30, 2026
Merged

garyscavone merged 1 commit into
thestk:masterfrom
ERSUCC:master

Conversation

@ERSUCC

@ERSUCC ERSUCC commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

This PR introduces PipeWire as a new API option for Linux. Systems that use PipeWire (primarily Fedora) cannot open duplex streams with ALSA, so explicitly supporting PipeWire allows this functionality on those systems. Based on my current understanding of the PipeWire API, there is only one major limitation, which is that the actual buffer size at runtime may not match the provided buffer size. PipeWire audio streams are virtual and can be arbitrarily interconnected, so the latency of one stream may vary over time based on the sample rates and requested latencies of the other streams in the network. Additionally, all PipeWire streams run internally at 48000 Hz regardless of the input sample rate, so the actual buffer size may differ from the requested size in order to preserve audio quality when resampling the input data.

NOTE: The code in this PR was written and tested by me, without the use of any LLMs. It took a while for me to get acquainted with the PipeWire and RtAudio APIs, and my implementation may not be entirely bug-free, but I'm happy to amend the PR or submit bug fixes in the future as necessary.

Fixes #494

@ERSUCC

ERSUCC commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Also note that OSS dev packages are no longer supported as of Ubuntu 26, so I had to comment out the OSS test in the workflow file to get the tests to all pass in this PR. That change should probably not go in this PR, if it's something that should be removed.

@garyscavone

Copy link
Copy Markdown
Contributor

Thanks! I'll go ahead and merge this and if people find bugs, they can be fixed as needed.

@garyscavone
garyscavone merged commit f799b84 into thestk:master Nov 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to synchronize duplex stream with ALSA on Fedora

2 participants