Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
i'm building a sound engine entirely based on OpenAL for portability. there are lots of controls and settings within my example UI so i've place everything in a scrollView. i've noticed that during any of my sound animations (panning, vibrato, etc.), which rely heavily on repetitive timers, the timers stall if i begin scrolling. scrolling kills my sound animations. to be clear, scrolling only seems to pause my timers, which will continue from where they were paused when scrolling stops.

i'm not planning on using a UIScrollView in a published app, but i still find this to be a bit on the ridiculous side of things. :rolleyes:

any thoughts? workarounds?
 
The UIScrollView will be pausing the main run loop as it processes the UI interaction (it may well be starting it's own run loop for that). This will cause your timers to "stall" as they are also fired off the main run loop.

Possible solution: create your own run loop running on a separate thread and schedule the timers on that run loop.
 
You need to add your timers to the runloop using NSRunLoopCommonModes. Then they won't be paused during scrolling.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.