Any window length and block interval is supported, but the FFT size may be rounded up to a faster size (by zero-padding). It uses a heuristically-optimal Kaiser window modified for perfect-reconstruction.
Simulated bad-case aliasing (random phase-shift for each band) for overlapping ratios
There is a "latest valid index", and you can read the output up to one historyLength behind this (see .resize()). You can read up to one window-length ahead to get partially-summed future output.
You move the valid index along using .ensureValid(), passing in a functor which provides spectra (using .analyse() and/or direct modification through .spectrum[c]):
int inputStart = blockStartIndex + (1 - windowSize);
stft.analyse(inputBuffer.view(inputStart));
});
auto earliestValid = stft.at(0);
auto latestValid = stft.at(blockSize);
stft += blockSize;
}
The index passed to this functor will be greater than the previous valid index, and <= the index you pass in. Therefore, if you call .ensureValid() every sample, it can only ever be 0.