source-output: remap volume_factor_source when starting move
authorTanu Kaskinen <tanuk@iki.fi>
Thu, 7 Jan 2016 13:25:41 +0000 (15:25 +0200)
committerArun Raghavan <git@arunraghavan.net>
Fri, 22 Jan 2016 07:55:29 +0000 (13:25 +0530)
commit6a754ad4a975de8f7b4d6520a6f6c5f43f6f786b
tree8da4677c2de50a49614c0dc7fd91f41c5fe97833
parentb2e7cf65212a1abfbff282965e582f8fc56a964a
source-output: remap volume_factor_source when starting move

This gets rid of an error message from the debug log. If
volume_factor_source would actually be used somewhere, this bug would
have caused more severe problems.

volume_factor_source should have the source's channel map. When moving
the stream, the volume needs to be remapped from the old source's
channel map to the new source's map. However, when the stream is being
moved, there is a period where the old source has already been
forgotten and the new source isn't yet known, so the remapping can't
be done directly between the two channel maps. Instead, the volume is
remapped from the old source's map to the stream's own map when the
move starts, and again remapped from the stream's map to the new
source's map when the move finishes.

The first remapping was missing, causing the second remapping fail and
print an error to the log.

(I checked the sink input code as well. It didn't have this bug.)
src/pulsecore/source-output.c