Software Implementation of Automatic Gain …