Skip to content

Commit 5c1644f

Browse files
committed
AudioFFTBase: window on stride
1 parent 4abc666 commit 5c1644f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AudioTools/AudioLibs/AudioFFT.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ class AudioFFTBase : public AudioStream {
207207
if (!p_driver->begin(cfg.length)) {
208208
LOGE("Not enough memory");
209209
}
210+
int step_size = cfg.stride > 0 ? cfg.stride : cfg.length;
210211
if (cfg.window_function != nullptr) {
211-
cfg.window_function->begin(length());
212+
cfg.window_function->begin(step_size);
212213
}
213214

214-
int step_size = cfg.stride > 0 ? cfg.stride : cfg.length;
215215
bool is_valid_rxtx = false;
216216
if (cfg.rxtx_mode == TX_MODE || cfg.rxtx_mode == RXTX_MODE) {
217217
if (cfg.stride > 0 && cfg.stride < cfg.length) {

0 commit comments

Comments
 (0)