Skip to content

Commit

Permalink
Merge pull request #201 from anarkiwi/o1
Browse files Browse the repository at this point in the history
sample_count_ off by one.
  • Loading branch information
anarkiwi committed Jan 31, 2024
2 parents b283e04 + f389e81 commit 8a713cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/retune_fft_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ void retune_fft_impl::write_items_(const input_type *in) {

void retune_fft_impl::sum_items_(const input_type *in) {
volk_32f_x2_add_32f(sample_.get(), (const float *)sample_.get(), in, nfft_);
++sample_count_;
if (peak_fft_range_ && sample_count_ && sample_count_ == peak_fft_range_) {
calc_peaks_();
}
Expand Down Expand Up @@ -385,7 +386,6 @@ void retune_fft_impl::process_items_(size_t c, const input_type *&in,
fft_output += nfft_;
write_items_(in);
sum_items_(in);
++sample_count_;
++produced;
if (need_retune_(1)) {
if (!pre_fft_) {
Expand Down

0 comments on commit 8a713cb

Please sign in to comment.