Added "measurement mode" support, added input gain slider to sample app