Skip to content

Instantly share code, notes, and snippets.

@HikariKnight
Last active May 14, 2020 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HikariKnight/64e8badc58a4b88422609014ce20e720 to your computer and use it in GitHub Desktop.
Save HikariKnight/64e8badc58a4b88422609014ce20e720 to your computer and use it in GitHub Desktop.
Split audio from programs in pulseaudio

First copy default.pa to ~/.pulse if you do not have it there already

mkdir ~/.pulse
cp /etc/pulse/default.pa ~/.pulse/

Open ~/.pulse/default.pa in a text editor and add this for each audio channel you want

# Make a dummy sink for split audio
load-module module-null-sink sink_name=sinkname
update-sink-proplist sinkname device.description="description Audio"
update-source-proplist sinkname.monitor device.description='Monitor of description Audio'
load-module module-loopback source=sinkname.monitor sink=devicename latency_msec=1

Replace sinkname with a unique name for your audio channel, and update "description"
to give a descriptive name to the sink.

Replace devicename with your audio speaker/headphones device name, you can find those with the command below

pacmd list-sinks | grep -e 'index:' -e 'name:'

the * indicates which device you currently are listening to.

Once you are done, restart pulseaudio with

pulseaudio --kill

If pulse does not auto start again just run pulseaudio --start

Then you can find your new audio channels in pavucontrol and you just change programs that play audio to play it to your new audio channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment