Hi, Jules and every one! I'm newby to develop GUI and Multi-Thread...
I want to create AudioVisualizer, so I'm trying to learn example codes.
Then I have a question about SpectrogramComponent. ( in SimpleFFTExample project )
I feel that SpectrogramComponent may drop audio data when pushNextSampleIntoFifo() is called from AudioThread.
Is this right...??
SpectrogramComponent.h Line:72
void pushNextSampleIntoFifo (float sample) noexcept { // if the fifo contains enough data, set a flag to say // that the next line should now be rendered.. if (fifoIndex == fftSize) { if (! nextFFTBlockReady) { zeromem (fftData, sizeof (fftData)); memcpy (fftData, fifo, sizeof (fifo)); nextFFTBlockReady = true; } else { //sometimes come here. //Does that mean this drop fifo AudioData because TimerThread is drawing???" } fifoIndex = 0; } fifo[fifoIndex++] = sample; }
Please give me any suggestion & approach... : (