MEX: add gain factor to interface