xpra icon
Bug tracker and wiki

Opened 2 years ago

Last modified 2 months ago

#1148 assigned enhancement

per-client virtual audio devices - better pulseaudio API

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: improbable
Component: sound Version: trunk
Keywords: Cc:

Description

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.

Change History (2)

comment:4 Changed 10 months ago by Antoine Martin

Milestone: 1.0future

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\"'",
    "--load=module-native-protocol-unix",
    "--load=module-dbus-protocol",
    "--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.

comment:5 Changed 2 months ago by Antoine Martin

Milestone: futureimprobable
Status: newassigned
Note: See TracTickets for help on using tickets.