I've recently swapped to Ubuntu and am trying to emulate what I used to do with virtual audio cable on Windows. I found a great tutorial that does exactly what I want it to do, but it of course becomes a little tiresome to type in all these verbose commands every time I have to restart the machine. My commands are as follows:
pactl load-module module-null-sink sink_name=GAME sink_properties=device.description="GAME" pactl load-module module-null-sink sink_name=MUSIC sink_properties=device.description="MUSIC" pactl load-module module-combine-sink sink_name=GAME_and_out sink_properties=device.description="GAME_and_out", slaves=0,1 pactl load-module module-combine-sink sink_name=MUSIC_and_out sink_properties=device.description="MUSIC_and_out", slaves=0,2
I want to move the required commands into my
.profile file, but this duplicates the procedure every time I log in, leading to the creation of many extra sinks that I don't need nor want.
Is there a way to either remove the old null sinks created with
pactl load-module module-null-sink, or write an
if block to wrap it in that will not fire if those sinks already exist?