Xpra: Ticket #1148: per-client virtual audio devices - better pulseaudio API

Follow up from #1141, see also #912.

Ideally, we want a synchronous pulseaudio API to query and configure pulseaudio (ie: set the default devices), without having to spawn a new process each time (as we currently do by running pactl)

This would also allow us to have more precise control, and we could create new virtual devices for each user connection.

Thu, 10 Aug 2017 13:38:28 GMT - Antoine Martin: milestone changed

Currently the devices are created when pulseaudio is started using this command:

DEFAULT_PULSEAUDIO_COMMAND = ["pulseaudio", "--start", "-n", "--daemonize=false", "--system=false",
    "--exit-idle-time=-1", "--load=module-suspend-on-idle",
    "'--load=module-null-sink sink_name=\"Xpra-Speaker\" sink_properties=device.description=\"Xpra\\ Speaker\"'",
    "'--load=module-null-sink sink_name=\"Xpra-Microphone\" sink_properties=device.description=\"Xpra\\ Microphone\"'",
    "--log-level=2", "--log-target=stderr"]

Adding new devices is possible using pacmd load-module ..., but we would need to keep track of the ones we create and remove them when the client exits. And we probably shouldn't change the default sink anyway, so these devices wouldn't be used by default, and might just confuse applications and users alike. I'm not sure what the benefit would be.

Wed, 28 Mar 2018 06:09:19 GMT - Antoine Martin: status, milestone changed

Sat, 23 Jan 2021 05:16:18 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1148