Re: How to control the right and left channel for a specific application using CLI ?

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

 



Le 2020-11-04 01:17, Arun Raghavan a écrit :
On Tue, 3 Nov 2020, at 7:09 PM, 01ivier@xxxxxxxxxxxxx wrote:
Le 2020-11-03 23:49, Arun Raghavan a écrit :
> On Tue, 3 Nov 2020, at 5:28 PM, 01ivier@xxxxxxxxxxxxx wrote:
>> Hello again,
>>
>> I want to know if there is a way, still in command line, to control
>> the
>> right and left volumes of an application.
>> With Pulseaudio Volume Control, you can click on the lock icon related
>> to a launched application, and two sliders appear to do so.
>> Is it possible in CLI ?
>>
>> My goal is to run two applications on the same card, but to assign
>> right
>> channel for one and left for the other.
>>
>> Possible complication : the output of my application is in mono and
>> with
>> Pulseaudio Volume Control I don't get the two sliders if I click on
>> the
>> lock icon.
>
> You can use pactl to do this:
>
>   pactl set-sink-input <sink input index> <volume for channel 1>
> <volume for channel 2> ...
>
> You can look up the sink input index and channel map for channel order
> with:
>
>   pactl list sink-inputs
>
> -- Arun

Hello Arun and thanks for the quick answer.

It's exactly the command I was looking for.
Unfortunately, as I thought, it doesn't work in my case because my
output is in mono.
Here's what I get:
Failed to set volume: You tried to set volumes for 2 channels, whereas
channel(s) supported = 1

I can't change the output of the software.
Is there possibly a way to create a virtual stereo output from the mono

Yup, check out module-remap-sink:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-remap-sink

-- Arun

Thank you,

Your answer is good... I just asked the wrong question... Sorry...

What could help me, in my case, is to remap the mono sink-input (the ouput of my application) into a stereo one, so that I could control the volume of each channel with set-sink-input.
Maybe I missed something but module-remap-sink doesn't like to do it.

I tried to use module-remap-source but "Name or index of the master source" seems to concern sink listed with "pacmd list-sinks" not "pactl list sink-inputs".

Is there a solution to get a stereo sink-input from a mono one ?

Thank you.

°1ivier
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss




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

  Powered by Linux