5

When I open an application it uses my default PulseAudio output device.

I would like to force a specific application to always use a different device, is this possible?

Baa
  • 3,452

2 Answers2

0

Not exactly what I wanted but I found an acceptable solution by setting an environment variable each time I launch the application:

PULSE_SINK="[Speaker Name]"

e.g.

PULSE_SINK="Virtual1" mpv

Unfortunately, some applications don't honour this variable and must grab the default audio device some other way.

Baa
  • 3,452
0

I found a more general solution to this problem.

Install pavucontrol it is available for every major distribution.

Launch pavucontrol and open the "Playback" tab. Launch your playback application and start playing something. Look at the "Playback" tab in pavucontrol, you can see a entry with your playing application and a button to change the used audio device and select the desired device.

You only need to do this once, pavucontrol will save the configuration.

  • Yes this is a great solution. My only issue is that some programs won't let you change the output speaker, and worse others delete the Sink every time you click out of the program, and re-create it using the default speaker, somehow ignoring the Pavucontrol defaults :( These programs also ignore the PULSE_SINK variable I've yet to find a solution except for changing my default speaker when it launches. – Baa Aug 20 '21 at 17:11
  • For people not seeing, as it is not shown, the button to change the used audio device should look like this. – Benjamin Loison Jan 28 '24 at 23:32