af_volume: do not change data when volume is 1
commit6cecbf38c110bd3fb83ed06523d5045fa1481139
authorwm4 <wm4@mplayer2.org>
Thu, 22 Dec 2011 06:33:15 +0000 (22 07:33 +0100)
committerUoti Urpala <uau@mplayer2.org>
Mon, 16 Jan 2012 20:40:14 +0000 (16 22:40 +0200)
treefe9622733cca34e95f7011882ffe5bd10b547572
parent5489d0e89a1ed40d585134e7e5161eb92228e349
af_volume: do not change data when volume is 1

When the volume multiplier is 1, the data shouldn't be changed, but the
code actually multiplied each sample with 255/256. Change the factor to
256, and hope there wasn't a good reason for the value 255.

Additionally, don't work on the data if it wouldn't be changed anyway.
This is a micro-optimization.

This doesn't touch the code path for the float format.
libaf/af_volume.c