[pulseaudio-discuss] [PATCH 1/4] sink, source: Assign to reference_volume from only one place

David Henningsson david.henningsson at canonical.com
Tue Apr 8 03:49:07 PDT 2014


On 04/08/2014 10:11 AM, Tanu Kaskinen wrote:
> On Tue, 2014-04-08 at 11:06 +0300, Tanu Kaskinen wrote:
>> On Tue, 2014-04-08 at 09:12 +0200, David Henningsson wrote:
>>> A question about the name - pa_sink_set_reference_volume_direct, is
>>> there also an indirect way of setting reference volume? Or why is it not
>>> simply just called pa_sink_set_reference_volume?
>>
>> The word "direct" refers to the lack of extra stuff happening. The
>> "indirect" way is to use pa_sink_set_volume(), which is the primary
>> interface for setting the reference volume, but that function does more
>> stuff than just update the reference_volume variable.
>>
>> I don't mind calling the function pa_sink_set_reference_volume(), so
>> I'll change the name to that.
> 
> Hmm, what about the function pa_sink_input_set_volume_direct()? Do you
> think that's a good name? I can't just drop the _direct() suffix,
> because pa_sink_input_set_volume() already exists.

So the difference between _direct() and not direct is that the _direct()
function bypasses flat volume logic?

Feel free to keep _direct() if you wish. Maybe add a comment saying that
if you want flat volume logic, use the other function.


-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list