# Online Gaming via Jitsi Stream game and own voice to Jitsi and hear the other participants as well as the game sound. * jitsi_sink input is used for everything that should go to Jitsi: output goes to JITSI-Meeting: * That is game output (game sink output) and own voice (Microphone). * game_sink should be the target of the game-source ``` # Once: find out how the devices are called: pactl list short sources pactl list short sinks # Example: Vega headphones=alsa_output.pci-0000_00_1b.0.analog-stereo microphone=alsa_input.pci-0000_00_1b.0.analog-stereo # Example: Sirius headphones=alsa_output.pci-0000_29_00.6.analog-stereo microphone=alsa_input.pci-0000_29_00.6.analog-stereo # Use null-sinks as "aliases" pactl load-module module-null-sink sink_name=jitsi_sink sink_properties=device.description=jitsi_sink pactl load-module module-null-sink sink_name=game_sink sink_properties=device.description=game_sink # Connect game and microphone to Jitsi pactl load-module module-loopback source=game_sink.monitor sink=jitsi_sink pactl load-module module-loopback source=$microphone sink=jitsi_sink # Connect Jitsi to headphones pactl load-module module-loopback source=game_sink.monitor sink=$headphones # Manually connect Chromium (Jitsi) to $headphone in pavucontrol # Adjust volumes - manually or like this: #pactl set-sink-volume $jitsi_sink 100% #pactl set-sink-volume $game_sink 100% ``` 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: ``` # Create a config file for openalsoft that allows the source to move # but still uses the wrong default # ~/.alsoftrc [pulse] allow-moves=yes ``` [Source of this solution](https://steamcommunity.com/app/93200/discussions/0/864959809826195633/) After the game you can unload the modules: ``` # Unload pactl unload-module module-loopback pactl unload-module module-null-sink ``` ## Links * [Mixing Additional Audio](https://wiki.archlinux.org/index.php/PulseAudio/Examples#Mixing_additional_audio_into_the_microphone's_audio)