Closed Caffiendish closed 2 years ago
This is because of the buffer size you are probably getting from OnGeneratePCMData. I assume you have two channels (so the PCM data size is 1024 each generation), and therefore your sample size is 512.
So, the FFTSubbandSize shouldn't allow being set higher than the possible sample size, or should set itself accordingly upon receiving the first frame where it's set higher than could be useful?
First is right, the FFTSubbandSize shouldn't allow being set higher than the possible sample size. The second one may also be true, but this does not follow directly from the algorithm, so need to test this approach to be sure.
If FFTSubbandsSize is set higher than 512, beat detection fails every frame.