Access a member function of the AudioProcessorEditor class via the AudioProcessor class

Also^3: If one thinks “I’m smarter that the machine, I use a smart pointer (aka WeakReference)”, it is still possible that the editor is just being destroyed while you are executing code there, because these are different threads.
“Ok, but I can use a ReferenceCountedObject to make sure, it is only being deleted when I release my reference”, then you have to hack the AudioProcessor, as that one uses a normal ScopedPointer and will trigger the destruction regardless of your counted reference…
It all leads nowhere and is not worth it…

Back to the topic: there is a simple level meter for a specific purpose in the AudioDeviceSelectorComponent. It is not meant to be used outside the Component, but you can see how they did it:

Also setting a link here to the thread from sondzark, and see my answer there: