1 # Online Gaming via Jitsi
3 Stream game and own voice to Jitsi and hear the other participants as well as the game sound.
5 * jitsi_sink input is used for everything that should go to Jitsi: output goes to JITSI-Meeting:
6 * That is game output (game sink output) and own voice (Microphone).
7 * game_sink should be the target of the game-source
11 # Once: find out how the devices are called:
12 pactl list short sources
13 pactl list short sinks
16 headphones=alsa_output.pci-0000_00_1b.0.analog-stereo
17 microphone=alsa_input.pci-0000_00_1b.0.analog-stereo
20 headphones=alsa_output.pci-0000_29_00.6.analog-stereo
21 microphone=alsa_input.pci-0000_29_00.6.analog-stereo
23 # Use null-sinks as "aliases"
24 pactl load-module module-null-sink sink_name=jitsi_sink sink_properties=device.description=jitsi_sink
25 pactl load-module module-null-sink sink_name=game_sink sink_properties=device.description=game_sink
27 # Connect game and microphone to Jitsi
28 pactl load-module module-loopback source=game_sink.monitor sink=jitsi_sink
29 pactl load-module module-loopback source=$microphone sink=jitsi_sink
30 # Connect Jitsi to headphones
31 pactl load-module module-loopback source=game_sink.monitor sink=$headphones
33 # Manually connect Chromium (Jitsi) to $headphone in pavucontrol
35 # Adjust volumes - manually or like this:
36 #pactl set-sink-volume $jitsi_sink 100%
37 #pactl set-sink-volume $game_sink 100%
41 If pulseaudio sources have a `DONT_MOVE` flag it's not possible to change their associated sink. For some games like Deponia the solution is:
44 # Create a config file for openalsoft that allows the source to move
45 # but still uses the wrong default
50 [Source of this solution](https://steamcommunity.com/app/93200/discussions/0/864959809826195633/)
54 After the game you can unload the modules:
58 pactl unload-module module-loopback
59 pactl unload-module module-null-sink
64 * [Mixing Additional Audio](https://wiki.archlinux.org/index.php/PulseAudio/Examples#Mixing_additional_audio_into_the_microphone's_audio)