Re: How to choose the sound card for an application using CLI ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


It works !

For the record, it works too with the index value gived with :
pacmd list-sinks | egrep 'index|name:'

I prefer this way because, as I've got multiple times the same card, the name (which depends on how many card I've got) could change if I remove one of them. The index is fixed in that case.

Thanks a lot.


Le 2020-11-03 10:39, Tanu Kaskinen a écrit :
On Tue, 2020-11-03 at 02:25 +0100, 01ivier@xxxxxxxxxxxxx wrote:

I want to run applications with specifics sound cards in command line on
Ubuntu 20.04.
I know it is graphically possible with Pulseaudio Volume Control which
let me choose the card in a menu after the application is launched.
But I want to use command lines so that I can automatize the process in
a bash file (I've got ten sound cards and more to come).

I've tried "pactl set-default-sink" but it changes the card for all the
I've looked in "man pulse-cli-syntax" but I didn't find what I'm looking

I've also tried to use environment variables such as ALSA_CARD= and
ALSA_PCM_CARD= without success.

Is there a way to do what I want ?

Maybe the PULSE_SINK environment variable will do the trick. The
variable value is a sink name (to get a list of names, run "pactl list
sinks | grep Name").
pulseaudio-discuss mailing list

[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux