Skip to content

Commit

Permalink
dotX12/dev: Use the full tuple result of .iter.enumerate() where rele…
Browse files Browse the repository at this point in the history
…vant
  • Loading branch information
marin-m committed Jan 29, 2024
1 parent efbb397 commit fa03784
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fingerprinting/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ impl SignatureGenerator {

// Reorder the items (put the latest data at end) and apply Hanning window

for (index, _) in HANNING_WINDOW_2048_MULTIPLIERS.iter().enumerate() {
for (index, multiplier) in HANNING_WINDOW_2048_MULTIPLIERS.iter().enumerate() {
self.reordered_ring_buffer_of_samples[index] =
self.ring_buffer_of_samples[(index + self.ring_buffer_of_samples_index) & 2047] as f32 *
HANNING_WINDOW_2048_MULTIPLIERS[index];
multiplier;
}

// Perform Fast Fourier transform
Expand Down

0 comments on commit fa03784

Please sign in to comment.