Skip to content

Commit 5ff47fc

Browse files
author
Behnam Momeni
committed
Create Xpra-Mic-Source pulseaudio remapped source for Chromium
Applications like Chrome and Chromium do not accept to record from a monitor device, like "Monitor of Xpra Microphone" device, as reported at Xpra-org#1221 or werman/noise-suppression-for-voice#29 and so they report that no microphone is connected. A remapped device resolves this issue by creating a normal (non-monitor) source device. The name of the remapped device is **Xpra-Mic-Source** and not **Xpra-Microphone-Source** because the `get_pulse_device` function from the `xpra/audio/gstreamer_util.py` file expects to find exactly one sink device match when looking after the **Xpra-Microphone** name.
1 parent 3aebb0c commit 5ff47fc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

xpra/platform/features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
DEFAULT_SSH_COMMAND : str = "ssh -x"
3939
DEFAULT_PULSEAUDIO_CONFIGURE_COMMANDS : tuple[tuple[str, str, str], ...] = (
4040
("pactl", "set-default-sink", "Xpra-Speaker"),
41-
("pactl", "set-default-source", "Xpra-Microphone.monitor"),
41+
("pactl", "set-default-source", "Xpra-Mic-Source"),
4242
)
4343

4444
SOCKET_OPTIONS : tuple[str, ...] = (

xpra/scripts/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@ def get_default_pulseaudio_command() -> list[str]:
866866
"--exit-idle-time=-1", "--load=module-suspend-on-idle",
867867
"'--load=module-null-sink sink_name=\"Xpra-Speaker\" sink_properties=device.description=\"Xpra\\ Speaker\"'",
868868
"'--load=module-null-sink sink_name=\"Xpra-Microphone\" sink_properties=device.description=\"Xpra\\ Microphone\"'",
869+
"'--load=module-remap-source source_name=\"Xpra-Mic-Source\" source_properties=device.description=\"Xpra\\ Mic\\ Source\" master=\"Xpra-Microphone.monitor\" channels=1'",
869870
"'--load=module-native-protocol-unix socket=$XPRA_PULSE_SERVER'",
870871
"--load=module-dbus-protocol",
871872
"--load=module-x11-publish",

0 commit comments

Comments
 (0)