After a false start and going back to the beginning I'm comfortably getting code to run but I'm running into a problem with what I need my program to do and whether Android and the available hardware are able to do it.
I'm looking to input and output an audio stream and get under 25ms (perhaps 50ms if I really push it) round trip from mic to speaker combined with the ability to set the delay from 25ms (or 50ms) to 300ms with +-1ms granularity. I'm getting far too high of latency on my Gingerbread (2.3.5) phone (Samsung Exhibit II 4g - SGH-T679) using AudioTrack() and AudioRecord(). I've looked into OpenSL and from what I've read I wouldn't be able to get down to an acceptable latency. I've read that with Android 4.1 and OpenSL the latency is significantly reduced, but there seems to be some question as to the amount of reduction.
Does anyone have any advice or information they can point me to?
If I'm just doing it wrong can someone set me straight on how to achieve the latency I need?
If there's no other way I'm willing to put perhaps $250 towards a new device if it's a certainty that I can hit my benchmarks with it, is there a device someone can recommend which would work for what I'm doing?
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad: