1

I have two applications on startup, which I link together with loopbacks and null sinks. Everything works great, except everytime I start them I have to open pavucontrol and manually change the sink/source for each application. I know there is a command to change the default sink, but that doesn't help. I want to be able to assign a sink or source to each application's input and output without opening pavucontrol. There is obviously a way to do this (as pavucontrol is doing behind the scenes) I just can't find any documentation or anyone else who has done this before.

Images to demonstrate:

PulseAudio This is the setting I want to change.

1

Other than canging the default sink we can move a sink input or a source output to another sink or source using pactl (or pacmd).

move-sink-input ID SINK
Move the specified playback stream (identified by its numerical index) to the specified sink (identified by its symbolic name or numerical index).

move-source-output ID SOURCE
Move the specified recording stream (identified by its numericalindex) to the specified source (identified by its symbolic name or numerical index).

To list existing streams we can issue

pactl list sink-inputs
pactl list source-outputs

These can then be moved by index to another location given by index (or name), e.g.

pactl move-sink-input 5 1

Also see How to change pulseaudio sink with "pacmd set-default-sink" during playback? for using pacmd.

  • I did discover these commands when reading man pactl. The problem is, will these applications have the same index value every time they are started? I highly doubt it. I don't understand why other arguments to pactl can take the name of the stream as an argument, but these two cannot. I was thinking perhaps use grep or awk to deterime the index based on pactl list... but I am not well versed in either of those tools. – Aurelius Nov 2 '16 at 8:49
  • 1
    No, the index will change with each stream on a given sink/source. – Takkat Nov 2 '16 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.