[pulseaudio-discuss] [PATCH v2] sink-input, source-output: Fix mute saving

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sat Apr 26 01:31:32 PDT 2014


On Tue, 2014-04-15 at 10:59 +0300, Tanu Kaskinen wrote:
> "i->save_muted = i->save_muted || mute" makes no sense. The intention
> was most likely to use "save" instead of "mute" in the assignment.
> This line originates from reverting the volume ramping code, commit
> 8401572fd534f10e07ed6a418e1399b1294d5596.
> 
> The idea of "i->save_muted |= save" is that even if the mute state
> doesn't change, save_muted should still be updated, but only if the
> transition is from "don't save" to "save".
> 
> Changing "!i->muted == !mute" to "mute == i->muted" is cosmetic only.
> The rationale behind the old form was probably that when we still had
> pa_bool_t, booleans could in theory be defined as int, so comparing
> the values without the ! operator was not entirely safe. That's
> unnecessary now that we use the standard bool type, which can only
> have values 0 or 1.
> ---
>  src/pulsecore/sink-input.c    | 4 ++--
>  src/pulsecore/source-output.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

I pushed this now.

-- 
Tanu



More information about the pulseaudio-discuss mailing list