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

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sun Aug 4 23:03:29 PDT 2013


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.

-- 
Tanu



More information about the pulseaudio-discuss mailing list