-
Notifications
You must be signed in to change notification settings - Fork 233
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
Fix naming of audio devices under PipeWire #358
Fix naming of audio devices under PipeWire #358
Conversation
Hi, thanks for submitting the PR! It probably won't be merged for a while right now: we have to do a large degree of code rewriting around the pipewire code due to a licensing issue. After that, though, this is something that we can take a look at again. |
If that's something I can help with, let me know. Or is there already an issue describing what needs to be done? |
I greatly appreciate the offer! I'll make an issue, which probably should have been done a while ago anyways, ha. As for helping, that depends a lot on what parts on what parts of the code you're familiar with. Since it's a cleanroom effort, people who are familiar with the code in question can't make the modifications, as they're "tainted" for some time. Issue number is #359 |
I'm familiar with none of the code other than what I changed in this PR. Making those changes was the first time I've looked at NoiseTorch's sources. |
This patch should just be mandatory when using pipewire and custom nodes. |
There is nothing that prevents this patch from being merged right now. It just has to be rebased on the latest code from master. |
That's fair. I was hoping to avoid a situation in which we had to keep pulling master into the reimplementation branch but it may make more sense to bring this in now. |
Under PulseAudio, the user-friendly name for each audio device was stored under its `device.description` property. Under PipeWire, `device.description` is the name of the sound card, not the source/sink. This results in all source devices showing their sound card's name in NoiseTorch. Since I have multiple sources on the same sound card, it meant all my microphones had the same name, making NoiseTorch unusable. This commit changes the assignment of device names. When running under PipeWire, the `pulseaudio.Source.Description` field holds the correct device name, while the `pulseaudio.Source.PropList["device.description"]` field that was being used previously is the sound card's description. The NoiseTorch context must now be passed to the `getSources` and `getSinks` functions so they can check whether the program is running under PulseAudio or PipeWire.
265d2e0
to
0f361e2
Compare
Done. |
Thank you |
Under PulseAudio, the user-friendly name for each audio device was
stored under its
device.description
property. Under PipeWire,device.description
is the name of the sound card, not the source/sink.This results in all source devices showing their sound card's name in
NoiseTorch. Since I have multiple sources on the same sound card, it
meant all my microphones had the same name, making NoiseTorch unusable.
This commit changes the assignment of device names. When running under
PipeWire, the
pulseaudio.Source.Description
field holds the correctdevice name, while the
pulseaudio.Source.PropList["device.description"]
field that was beingused previously is the sound card's description.
The NoiseTorch context must now be passed to the
getSources
andgetSinks
functions so they can check whether the program is runningunder PulseAudio or PipeWire.
Screenshot
Before is on the left, after is on the right.
Ignore the first device on the left, as it is produced by the "fixed" NoiseTorch instance and would otherwise not be there.