aboutsummaryrefslogtreecommitdiff
path: root/.scripts/virtual_mic.sh
blob: a33382d4c4728b4bad3e273318db426e2da42dc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

# create virtual sinks
pactl load-module module-null-sink sink_name=VirtualSpeaker
pactl load-module module-null-sink media.class=Audio/Duplex sink_name=VirtualMicrophone

# create loopbacks
pactl load-module module-loopback source="VirtualSpeaker.monitor" sink="$(pactl get-default-sink)"
pactl load-module module-loopback source="$(pactl get-default-source)" sink="VirtualMicrophone"
pactl load-module module-loopback source="VirtualSpeaker.monitor" sink="VirtualMicrophone"

# set default mic
pactl set-default-source "VirtualMicrophone"