xpra icon
Bug tracker and wiki

Opened 2 years ago

Last modified 7 months ago

#1148 assigned enhancement

per-client virtual audio devices - better pulseaudio API

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: future
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 (4)

comment:1 Changed 20 months ago by Antoine Martin

Milestone: 1.01.1

Milestone renamed

comment:2 Changed 18 months ago by Antoine Martin

Milestone: 1.12.0

Milestone renamed

comment:3 Changed 12 months ago by Antoine Martin

Milestone: 2.02.2
Status: newassigned

comment:4 Changed 7 months ago by Antoine Martin

Milestone: 2.2future

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.

Note: See TracTickets for help on using tickets.