iPad slider issue

Hi guys!
I’ve noticed a slowdown issue on timerCallback when I move some slider, it seems like the playback stops while I move my finger up and down on a slider.
No problem with the button…
The issue is only on device, while on simulator everything’s fine. Maybe is due to ios gesture not properly linked…

Any idea?

Is this a debug or release build…?
I assume these are Juce Sliders not UISliders…?

Both on debug or release build…
Yes, I’m using Juce Slider.
On simulator it runs fine without any dropout…the problem is only on the device

I can’t reproduce that on an iPad (2) device. I have a simple test audio app that plays a sine wave controlled by a Slider and a Label displaying the audio manager CPU usage from a Timer. The Label seems to update at a similar rate while manipulating the Slider.

Perhaps you’re doing something time consuming in a SliderListener callback? What do you mean by “drop out”?

I’ve tried to bypass all the sliderListener callback (I’ve removed the listener from sliders) but I’ve the same problem…
It’s not a real dropout…it’s like if the interval between the timer callback is not regular, but slows down with irregular intervals. I’ve also noticed that on device it seems that the slider loses the grip while dragging back and forth.

I believe the docs describe what is going on pretty clearly, “The time interval isn’t guaranteed to be precise to any more than maybe 10-20ms, and the intervals may end up being much longer than requested if the system is busy. Because the callbacks are made by the main message thread, anything that blocks the message queue for a period of time will also prevent any timers from running until it can carry on.”

yes, it’s clear…but the question is… just dragging back and forth a slider that is not linked to any listener keeps the system busy? and why on simulator it runs fine?
I suppose it’s something related to the ios touch.

Moving a slider (regardless of listeners) will generate messages. pure speculation says the simulator performs differently than the real hardware, since it is running on a your host system. in both cases, I am not 100% sure about the cause of your problem (and I haven’t done any iOS stuff yet), but all the data points seem to indicate this is the case.

Ok I’ve solved the problem using a Thread insted of a Timer.
Thanks for the suggestion guys.

Let me add that the simulator runs MUCH faster (about 10x) than the hardware device.