Fix --gain with fractional gain values.

This avoid truncating the gain value before scaling.