diff --git a/src/utils/buffers/histogram_buffer.rs b/src/utils/buffers/histogram_buffer.rs index 265111f..86265e3 100644 --- a/src/utils/buffers/histogram_buffer.rs +++ b/src/utils/buffers/histogram_buffer.rs @@ -140,11 +140,11 @@ impl VisualizerBuffer for HistogramBuffer { // don't enqueue silence if value > 0.0 { let bin_index = self.find_bin(value); - self.data[bin_index] += (1.0 - self.decay_weight); // Increment the count for the bin for i in 0..self.size - 1 { // decay all values self.data[i] *= self.decay_weight; } + self.data[bin_index] += (1.0 - self.decay_weight); // Increment the count for the bin } }