Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a native PipeWire audio driver #10723

Open
InAJacket opened this issue Sep 12, 2024 · 0 comments
Open

Adding a native PipeWire audio driver #10723

InAJacket opened this issue Sep 12, 2024 · 0 comments

Comments

@InAJacket
Copy link

InAJacket commented Sep 12, 2024

Describe the project you are working on

A live audio playback application for performance. Think like playing SFX during theatre performances, running backing tracks for live musicians, etc.

Describe the problem or limitation you are having in your project

The current audio driver options on Linux/BSD don't fit my needs. The ALSA driver doesn't support audio input, and PulseAudio has issues with latency that aren't viable for a live performance environment. There was a proposal for JACK support a little while back, but it never got merged upstream, apparently due to issued with jackd.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

PipeWire solves both of these problems, and is widely considered the future of Linux audio. There has been a proposal for PipeWire support in Godot before (#5129), but that was before PipeWire hit version 1.0 and was declared stable for regular use.

I have already started working on a native PipeWire driver for my own use case. I thought maybe it would be welcome as a contribution upstream. I'm happy to provide ongoing support and improvements for it as time goes on, especially if the driver has any major issues.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

"PipeWire" will be a new valid audio driver name under Project Settings/Audio/Driver/Driver. The actual implementation will be pretty much invisible to normal engine users, as with the existing audio drivers. Just another folder in drivers/ on the core repo, and some new buildsystem lines should basically do it.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Not really. It's probably doable via GDExtension, but it makes much more sense to just make this a core feature.

Is there a reason why this should be core and not an add-on in the asset library?

Godot will likely need to implement native PipeWire support at some point in the future, when PulseAudio hits end of life. Drivers like this are also quite low-level, and will be much easier for me to implement as a core part of the engine.

Note that while PipeWire does replace PulseAudio in some cases, it will not do that here. PipeWire clients cannot interface with the PulseAudio server (to my knowledge). Their compatibility only works the other way around. For this reason, Pulse should stay as the default driver option for Linux/BSD until it is officially deprecated in favour of PipeWire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants