We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2986282 commit d40f184Copy full SHA for d40f184
src/fingerprinting/algorithm.rs
@@ -243,7 +243,7 @@ impl SignatureGenerator {
243
let peak_variation_1: f32 = peak_magnitude * 2.0 - peak_magnitude_before - peak_magnitude_after;
244
let peak_variation_2: f32 = (peak_magnitude_after - peak_magnitude_before) * 32.0 / peak_variation_1;
245
246
- let corrected_peak_frequency_bin: u16 = bin_position as u16 * 64 + peak_variation_2 as u16;
+ let corrected_peak_frequency_bin: u16 = bin_position as u16 * 64 + (peak_variation_2 as i16) as u16;
247
248
assert!(peak_variation_1 >= 0.0);
249
0 commit comments