I have a Component with several subcomponents. In subcomponent A, there is a time counter (like 00:00:00) that I’d like updated every x milliseconds. In subcomponent B, there is a JUCE slider. There is a lot more, but this is what matters. When I move the slider, the slider gets drawn quickly and the sliderValueChanged() callback shows me a lot of different values when I move from bottom to top.
But now when I start a timer (component A derives from the Timer class) and let’s say the timerCallback() is called every 125 milliseconds and move the slider, then the slider becomes very sluggish (the knob is drawn sluggish and only one or two values are received in sliderValueChanged() when moving from bottom to top). The timerCallback() contains a repaint(rect) where the rect contains the bounds of the time counter.
Removing repaint() makes the problem go away, so it is not the timer itself. I have put return; statements on the first line of all my paint() methods, so they don’t draw anything and that didn’t help. The sliderValueChanged() method does nothing more than print the value to logcat.
I’m on Android with JUCE 5.4.4.