AudioDemoTabComponent from the demo implements the above methods. Is there a way to call repaint() instead from the audioDeviceIOCallback instead of from the separate Timer loop? Having tried that directly I know that it crashes because it doesn't fit the JUCE threading model (lock problem). There doesn't seem to be a way to trigger Timer to call immediately (single fire), which I could call from the audio callback.
However, I'd like my software to react quickly as the data comes in. I'm calculating a pitch, and would like to call repaint() as it calculates the change. Previously, I've used a BlockingQueue to do this... Put the pitch in the Queue and trigger repaint when a pitch gets added. Maybe I can just call timer to react immediately? Should I not be doing computation in the audioDeviceIOCallback?
Confused by the event/processing model, any pointers appreciated.