I try to make an audio analyser so I need display of my analyser to be refreshing continuously, endless, or alway there is some audio on input.
So I tried to put MyDisplayClass::repaint() function in my AudioProcessor::processBlock(AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
But I get error like that:
void Component::internalRepaintUnchecked (Rectangle area, bool isEntireComponent)
// if component methods are being called from threads other than the message
// thread, you’ll need to use a MessageManagerLock object to make sure it’s thread-safe.
ASSERT_MESSAGE_MANAGER_IS_LOCKED Built-in Output (14): EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
How to deal with that? Could anyone help me?
Now I have some stupid solution. In the AudioProcessorEditor I created Slider::listener, and override
void sliderValueChanged(Slider * slider)
And inside of that I put MyDisplayClass::repaint()
And it woks, but to refreshing my display I need to moving my slider
Of course I though about create AudioProcessorValueTreeState in AudioProcessor and attache it to my slider, and then manipulate it continously in the processBlock. But I am not sure if it would work, but I also think it’s crude way.
So please, could anyone help me?