This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Audio Latency  RSS feed

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!