Re: Changing Volume on Streams ( not Sinks )

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

 



Thank you Georg!

About 12 hours ago I figured it out too. pa_context_set_sink_input_volume() is the function I was looking for, and I was mistakenly using pa_context_set_sink_volume_by_index(), an obvious flaw on my part.

The other way to get a sink-input id directly from a Stream, you don't need to list them all and find what you're looking for. That would be 'pa_stream_get_index'.

I would suggest adding a single sentence to the doc set ---

'pa_stream_get_index' should note that what is returned is a 'sink input' or 'source output' id, depending on the type of stream. The note there says "useful for functions such as" which are functions that take those kinds of IDs, but a little clarity would be helpful.

If there was a description somewhere in the doc set about the 4 different id spaces ( more? ), at a higher level, that would be really great. That finally clicked for me when I was looking at pacmd/pactl and seeing how that tool lists things, see the different IDs and what you can do with them. It doesn't really fit in any of the higher level sections, because it applies to both simple and async and others....

I like PulseAudio quite a bit -- can I give back by trying to write up a page?

Thanks!

On 7/29/2019 12:21 AM, Georg Chini wrote:
On 28.07.19 19:44, Brian Bulkowski wrote:
I posted yesterday, twice, about how the "stream get sink id" was going to solve my problems.

In 10.0 ( the distro version on Debian Stretch on the Raspberry PI ), the "sink ID" returned from that call is not a valid sink ID and doesn't do anything good.

I am hoping this call is more functional ( does anything functional ) in later revs, so I'm onward to upgrading to 12.2 or similar, before embarking on creating lots of extra Sinks in the configuration system.

-brian

Hi Brian,

first, let me clarify the terminology pulseaudio is using:

- The term "sink" is used for for an audio output, for example your
speakers connected to your internal sound card or an USB or
Bluetooth device.

- The term "sink input" refers to an individual stream. A sink input
can be connected to a sink. Then the stream will play on your
output device.

To list sink inputs, the function pa_context_get_sink_input_info_list()
can be used. Then the volume can be changed with
pa_context_set_sink_input_volume().

For complete documentation see
https://freedesktop.org/software/pulseaudio/doxygen/

The functions I referenced above can be found at
https://freedesktop.org/software/pulseaudio/doxygen/introspect_8h.html

Regards
             Georg

_______________________________________________
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