Repository navigation
Add PipeWire support for Linux - #495
Merged
Merged
Conversation
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. |
Contributor
|
Thanks! I'll go ahead and merge this and if people find bugs, they can be fixed as needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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