]> code.delx.au - pulseaudio/commit
sink-input, source-output: Fix mute saving
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Tue, 15 Apr 2014 07:59:03 +0000 (10:59 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Sat, 26 Apr 2014 08:30:01 +0000 (11:30 +0300)
commitcd2db42a6a462c4ad2441984466874a85fec9fbc
treea46231ebb1e12b3790fd04b56239dfb325daa6f8
parent4bd39f950155be98821a9072bcafed7fccca1a7d
sink-input, source-output: Fix mute saving

"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
src/pulsecore/source-output.c