Opticos / GWSL-Source

The actual code for GWSL. And some prebuilt releases.
https://opticos.github.io/gwsl/
Other
1.16k stars 80 forks source link

Able to flip pulseaudio on demand while running #103

Closed mailinglists35 closed 1 year ago

mailinglists35 commented 3 years ago

First, thanks to bundling everything together, this is great for lazy me that used to run them all separated!

I have one issue though, is there any way you could run the pulseaudio without the microphone icon popping up in system tray?

I am used to not see it unless an app absolutely needs to use the microphone right now.

It seems that the pulseaudio server triggers the microphone icon permanently.

Maybe dynamically user to be able to restart pulseaudio daemon in two configuration modes, one with microphone and in one without it, user selectable from GUI config of the app? I don't think I need pulseaudio to permanently hook the microphone device, even if it actually does not make use of it. Or as fallback if unable to selectively ignore sources on pulseaudio.exe, to be able to shut it off completely until I actually want audio playing from WSL clients?

A major drawback of current state is that I would miss real microphone notification if some other app actually wants to use the microphone so I always end up exiting GWSL and starting VcXsrv on demand or bundled in MobaXterm when I need WSL GUI apps...

I tried to disable the inputs dynamically inside pulse with pactl like this but it fails on windows: https://unix.stackexchange.com/questions/263263/remove-pulseaudio-device

$ pactl unload-module 7
shared memfd open() failed: Function not implemented

"pactl list" relevant module:

Module #7
Name: module-waveout
Argument: sink_name=output source_name=input record=0
Usage counter: 0
Properties:
module.author = "Pierre Ossman"
module.description = "Windows waveOut Sink/Source"
module.version = "1.1"

the same error with

$ sudo pactl suspend-source 2 true
shared memfd open() failed: Function not implemented
Failure: No such entity
Pololot64 commented 3 years ago

Glad it is helpful! :) I am not really planning to change the logic in the GWSL code itself (because it is already a pain to manage pulseaudio) but if you get the Github version of GWSL you can look in the PULSE folder in the install location. It has all the configuration files.