jQuery in Action, 2nd edition*
The moose likes Android and the fly likes Audio Latency Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Audio Latency" Watch "Audio Latency" New topic
Author

Audio Latency

Sam Kostler
Greenhorn

Joined: Jan 20, 2013
Posts: 4
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?

Thanks!
 
 
subject: Audio Latency
 
Similar Threads
Is there an Android Hardware that is NOT a phone? Like a tablet?
Android or Iphone?
Using Java to access Sound Card
Small problem with method call
Cheapest phone for testing