[pulseaudio-discuss] [PATCH 1/8] devices: Set certain sink/source flags automatically.

Colin Guthrie gmane at colin.guthr.ie
Sun Jul 17 07:47:23 PDT 2011

'Twas brillig, and Tanu Kaskinen at 13/07/11 17:00 did gyre and gimble:
> On Wed, 2011-07-13 at 15:37 +0100, Colin Guthrie wrote:
>> 'Twas brillig, and Tanu Kaskinen at 13/07/11 14:29 did gyre and gimble:
>>> Another thing came to my mind: what about having assertions for checking
>>> PA_SINK_SYNC_VOLUME are set? If the sink implementations can't control
>>> the flags anyway, wouldn't it make sense to prevent them from trying?
>> Not really sure where you suggest such a check goes.
>> Do you mean e.g. before the initial call to
>> pa_sink_set_flags_from_callbacks() inside pa_sink_put()?
> Yes.

Fair enough but this approach is opposed to your other suggestion of
using specific callback setters.... This assert doesn't make sense if a
callback setter is used.

Now.... which approach is best??..... :p

I'm flip flopping between which one I want to do... both have
disadvantages and advantages. The fact that the structures are not
opaque and we call the callbacks directly from their member variables
means that a setter feels slightly wrong, but by the same token this
approach is already used elsewhere, so nothing major changes in that regard.

I guess overall, using a setter feels slightly cleaner. I'll go with that.



Colin Guthrie

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

More information about the pulseaudio-discuss mailing list