• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Timing

Hi,

I have done a little app witch plays a tone (Via the ToneGenerator) and then turn on the LED flash on shortly.
This is all working fine, but I have a timing issue. The time between the audio and the video is variating (having jitter) with about 50ms. I need to be sure that there always are the same delay between the flash and the audio ( a max jitter of about 5ms is ok) Do anybody have a solution for this or is it just not possible with the way Android works. ( I am developing on a Galaxy SII running 4.0.4)
 
Android runs on Linux, so there must be some way to set the nice level of the app, right? Have you tried setting nice to big negative numbers?

I don't know how you're making the tone and light flash, but if it's an old school loop for one or the other, you might try putting both in the same loop. That should force them to be synchronous. If the HAL or something else keeps this from working, you'll probably need to think about writing in ring 0.

That's all I can think of off-hand.
 
Back
Top Bottom