The new version seems to fix that since your comment was written, but it will stil panics if less than 2 samples are provided, unless the crate it wraps panics at an earlier point.
let peak = buf
.iter()
.copied()
.enumerate()
.take(self.sample_count / 2)
.max_by_key(|(_, s)| (s.abs() * 1000.0) as u32)
.expect("to have at least 1 sample");
I agree with the sentiment but …
Companies already put serial numbers in components and configure them so only specific ones work together, requiring OEM tools to pair them.
It’s imaginable that someone makes something similar with e-fuzes instead.