Audio visualiser not plotting anything

Hi! I’ve been trying to make the audio visualiser work for a few days and I can’t seem to find the problem. For debugging purposes I have got rid of everything I thought could be causing an issue (I got rid of the circular buffer so I’m just sending the buffer directly, I thought maybe the size could be a problem so I’ve tried giving it much more space but still nothing, and set every condition to true so the program is accessing every if statement) however it’s still not working. In the pluginProcessor processBlock function I’m sending the buffer like this:
waveScreen.pushBufferIntoVisualiser(buffer); The function in the waveScreen class is this one:

{
    if (isScreenEnabled)
    {
        audioVisualiser.pushBuffer(buffer);
    }
}

The settings for audioVisualiser:

  audioVisualiser.setRepaintRate(30);
  audioVisualiser.setBufferSize(128);
  audioVisualiser.setSamplesPerBlock(16);
  audioVisualiser.setNumChannels(1);

I have nothing in the paint method so it’s not being blocked. I want a representation of mono audio so I declare the visualiser this way:

juce::AudioVisualiserComponent audioVisualiser{ 1 };

I debugged the content to check that the audioBuffer was not empty and this was the output (this was using the circularBuffer which I got rid off for right now so I could first solve the problem):

//CODE
        if (isScreenEnabled)
    {
		DBG("Pushing samples to visualiser");
        for (int i = 0; i < numChannels; ++i)
        {
			DBG("Pushing sample: " << samples[i]);
            circularBuffer.push(samples[i]);
        }
        audioVisualiser.pushBuffer(buffer);

        // Retrieve samples from the circular buffer and push them to the visualizer
        float sample;
        while (!circularBuffer.empty() && circularBuffer.pop(sample))
        {
			DBG("Popped sample: " << sample);
            audioVisualiser.pushSample(&sample, 1);
        } 
    }

//OUTPUT
Pushing samples to visualiser
Pushing sample: -0.00268309
Pushing sample: -0.00310679
Popped sample: -0.00268309
Popped sample: -0.00310679

Any help is very appreciated. Thank you very much!

Do you actually have the visualizer added, visible and with bounds set correctly in the main plugin editor code?

Yes! So it looks like the problem was that I had two different instances of the waveScreen class, one in the editor and the other one in the processor so that’s why it wasn’t showing.