Here's my issue: I'm developing a sort of music game where the user can input to android from a midi keyboard (I am using this library: https://github.com/kshoji/USB-MIDI-Driver). For my main game layout, I use a surface view coupled with a game loop. I optimized my onDraw() to be very quick, but for whatever reason, my framerate is much slower when using the external midi keyboard, than when using touches on an on screen keyboard.
At first I though this was due to the overhead from the keyboard driver, but then I noticed that when I touch the screen, the framerate is no longer choppy, even when I am playing from the midi keyboard. Does anyone one know why this might be the case? Does android do some sort of background optimization for ui updates responding to a touch event? Thanks.
EDIT: I have scoped out some more information about my problem. Basically, what my device is doing is setting to CPU speed to low to save power. The policy (as defined by a CPU Governor) is to give the cpu a boost when the user touches the screen, and reduce the cpu clock speed when it doesnt detect any touches. My problem is that since I want to interact via an external device, and not through touch events, the cpu is slow and I get a bad framerate as a result. There are apparently ways to override this if you have root access... but I'd rather not resort to that :/. If anyone has any hacks or ideas, please let me know.