Mercurial > almixer_isolated
diff doc/ALmixer.doxyfile.cmake @ 24:e085cbc573cf
iOS optimization/bug/workaround.
It seems that usleep(10) is paradoxically causing the background thread to hog a bunch of CPU on iOS. (I don't see this on Mac.) Increasing the time to about 60 seems to start helping. More so at 100, but I began to worry about sleeping to long.
So instead I have an evil hack to change the thread priority for just iOS. (In theory, this approach can be applied to other platforms, but it is risky to muck with this.) Since SDL_thread doesn't have a priortiy API, I do some evil pointer math to get the pthread so I can call pthread_setschedparam. If SDL changes the implementation of SDL_thread including the structure layout, this will completely break.
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Fri, 24 Dec 2010 03:32:02 -0800 |
parents | 8cb13d89451a |
children |