Skip to content

Commit 69d4860

Browse files
committed
AudioFFT reset()
1 parent 49cc4c4 commit 69d4860

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/AudioLibs/AudioFFT.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ class AudioFFTBase : public AudioPrint {
119119
return p_driver->isValid();
120120
}
121121

122+
/// Just resets the current_pos e.g. to start a new cycle
123+
void reset(){
124+
current_pos = 0;
125+
if (cfg.window_function!=nullptr){
126+
cfg.window_function->begin(length());
127+
}
128+
}
129+
122130
operator bool() {
123131
return p_driver!=nullptr && p_driver->isValid();
124132
}

0 commit comments

Comments
 (0)