3 ms·
I'm curious, besides doing things in C/C++, are there any "magic tricks" to doing low-latency audio processing on Android? Looking at the chart here [1] it stil
by rsp1984 11y ago
I'm curious, besides doing things in C/C++, are there any "magic tricks" to doing low-latency audio processing on Android? Looking at the chart here [1] it still seems to be a good bit behind iOS.
[1] http://www.androidpolice.com/2015/11/13/android-audio-latency-in-depth-its-getting-better-especially-with-the-nexus-5x-and-6p/ http://www.androidpolice.com/2015/11/13/android-audio-latenc...
- parkaboy 11y agoIn the Java layer? About the only thing you can do is ensure that you're using the devices native sampling rate: typically 48 kHz for phones, and 44.1 kHz for tablets. Non-native sampling will induce a rather large latency hit. The buffering + buffer size stuff, unfortunately, is really only accessible in native IIRC. To be completely honest, it's been a long time since I've messed with audio-stuff on the Java-side, so not sure if/how much things have changed for the better.
- rsp1984 11y agoThanks. I actually meant in addition to doing the computation side of things in C/C++, are there any undocumented tricks or pitfalls to avoid?
- sehugg 11y agoThis is a good explainer of the various latencies in the Android audio pipeline: http://superpowered.com/androidaudiopathlatency http://superpowered.com/androidaudiopathlatency
- tonyarkles 11y agoAnd a cool follow-up article: http://superpowered.com/android-marshmallow-latency http://superpowered.com/android-marshmallow-latency Last time I worked on Android Audio was around the 4.1-4.2 era, and it was absolutely brutal compared to iOS. Glad to see that it's improving finally!