Change Sample reference to a pointer; minor reformatting.
Merge remote-tracking branch 'oliverlee/gainschd' into gainschd
Merge remote-tracking branch 'hazelnusse/gainschd' into gainschd
Add shell command to set both thresholds.