change gain at runtime