[PATCH] sink-input: Don't assert when removing non-existent volume factor

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

 



On Mon, 2013-08-05 at 09:03 +0300, Tanu Kaskinen wrote:
> On Sat, 2013-08-03 at 11:41 +0530, Arun Raghavan wrote:
> > This makes it easier for users of this API to add/updated a volume
> > factor by doing a _remove_volume_factor() followed by an
> > add_volume_factor(), rather than having to either remember whether this
> > is the first set operation or have an API to query whether a factor has
> > already been set.
> 
> There is a query API already:
> pa_hashmap_contains(i->volume_factor_items, key)
> 
> Oops, I was wrong, that function doesn't exist (it probably should be
> added). The same thing can be achieved with pa_hashmap_get() too,
> though.

I think it's a bit ugly to expect users of that API to check the
underlying structure itself first, though.

-- Arun



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

  Powered by Linux