Skip to content

Commit

Permalink
FFT cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Feb 20, 2025
1 parent df0b892 commit fa233a3
Show file tree
Hide file tree
Showing 2 changed files with 92,622 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/AudioTools/AudioLibs/AudioFFT.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,14 @@ class AudioFFTBase : public AudioStream {
cfg.window_function_ifft->begin(cfg.length);
}

int step_size = cfg.stride > 0 ? cfg.stride : cfg.length;
bool is_valid_rxtx = false;
if (cfg.rxtx_mode == TX_MODE || cfg.rxtx_mode == RXTX_MODE) {
// holds last N bytes that need to be reprocessed
stride_buffer.resize((cfg.length) * bytesPerSample());
is_valid_rxtx = true;
}
if (cfg.rxtx_mode == RX_MODE || cfg.rxtx_mode == RXTX_MODE) {
rfft_data.resize(cfg.channels * bytesPerSample() * step_size);
rfft_data.resize(cfg.channels * bytesPerSample() * cfg.stride);
rfft_add.resize(cfg.length);
step_data.resize(cfg.stride);
is_valid_rxtx = true;
Expand Down
Loading

0 comments on commit fa233a3

Please sign in to comment.