Apply gain to output sample instead of coeffs. Added more control over when coeffs are recalculated when setting params.