Fixed bug in telling ReadAnalogInputThread how many samples to send in a block when averaging is being done.