7

I found the Question and answer:

How can I use PulseAudio virtual audio streams to play music over Skype?

I am currently using the command

pactl load-module module-null-sink sink_name=Virtual1

to create my virtual devices. But would like to use

pactl load-module module-null-sink sink_name=Virtual1 sink_properties=device.description="NAME HERE (mic+music)"

But when issuing the command, I get the following error.

$ pactl load-module module-null-sink sink_name=Virtual2 sink_properties=device.description="NAME HERE (only music)"
Failure: Module initialization failed

Is there another way to name the device? Whilst making a virtual device.

AdminBee
  • 22,803

2 Answers2

4

There is no documentation to the effect but it looks like you need to create the sink first then assign it properties.

pacmd load-module module-null-sink sink_name=MySink
pacmd update-sink-proplist MySink device.description=MySink

To add a device.description with spaces please use the format "single-quotes"-"double-quotes"-"label".

pacmd load-module module-null-sink sink_name=MySink
pacmd update-sink-proplist MySink device.description='"My Sink"'
AdminBee
  • 22,803
mxc
  • 536
  • I've noticed a bug when using spaces in the description: "Failed to parse proplist." – KrisWebDev Jan 24 '16 at 15:58
  • Thank you! :-) You can play with pacmd in the first place to see the results live without restarting the daemon / local service. When you want to make this loaded by PulseAudio as default put these commands in default.pa configuration file (without pacmd). – CeDeROM Jan 20 '22 at 06:01
  • 1
    @CeDeROM if you use update-sink-proplist you do not need double quoting in default.pa. – jarno Dec 15 '22 at 15:54
  • Here is a related answer: https://unix.stackexchange.com/a/417190/111181 – jarno Dec 15 '22 at 19:39
1

You can use this:

pactl load-module module-null-sink sink_name=Virtual1 sink_properties="'device.description=\"NAME HERE (mic+music)\"'"

To make the same setting in default.pa file use line:

load-module module-null-sink sink_name=Virtual1 sink_properties='device.description="NAME HERE (mic+music)"'

These work at least by pulseaudio 13.99.1.

jarno
  • 620
  • If you have more than one property to set, you could just add them similarly separated by space within the outermost quotes. – jarno Dec 15 '22 at 20:14