How to get FFT spectrum with procedural audio

I’m generating some procedural audio by using the OnAudioFilterRead method, and it’s working beause I can hear the synthetized sound from the speaker.

When I’m trying to get the spectrum of the synthetized sound with

float[] data = new float[2048];
audioSource.GetSpectrumData(data, 0, FFTWindow.BlackmanHarris);

It always fills data array with 0. Is there any way to get the real spectrum of the synthetized audio?

The problem has been fixed in version 5.2