How can I get latency info from Android's AudioTrack class?
Posted
by Ryan
on Stack Overflow
See other posts from Stack Overflow
or by Ryan
Published on 2010-04-08T03:58:32Z
Indexed on
2010/04/08
4:03 UTC
Read the original article
Hit count: 336
I've noticed that the C++ classes underlying the AudioTrack and AudioRecord APIs in Android both have a latency() method that is not exposed via JNI. As far as I can see, the latency() method in AudioRecord still does not take into account the hardware latency (they have a TODO comment for that), but the latency() method in AudioTrack does add in the hardware latency.
I absolutely need to get this latency value from AudioTrack. Is there any possible way I can do this? I don't care what kind of crazy hack is needed as long as it doesn't require a rooted phone (the resulting code must still be packaged as an app on the market).
© Stack Overflow or respective owner