Toggleable high / low audio latency option for OpenSL [Android]

I’ve been receiving a lot of feedback from users where they tell me that while they could get great performance with r17, all of a sudden with r18 audio is crackling like mad even with threaded video turned on.

I think this is as a result of the changes that were made to the OpenSL driver for low audio-latency devices (Android 4.1) and up. I think we need variable buffer size options - one appealing to high-latency audio (like before), and the other for low-latency audio (like it is right now).

For that matter I can confirm that this does affect older devices. For instance, this el-cheapo Cortex A8 Android tablet I’ve been using since last year now no longer gets decent performance with any core - audio just stutters too badly and this reduces the FPS as well. This is with or without threaded video enabled.

So long story short maister - I think we need toggleable options for latency in OpenSL and expose this in the Java menu.

We definitely want to retain the current configuration (it runs great on Shield, should run great on the new Nexus 7 as well), but we should definitely offer an option to get the old buffer sizes and configuration back for the people on older devices that can’t match the low-latency requirements anyway.

One guy that reported to me that r18 led to a regression in this regard has a HTC One (with Beats audio), Android 4.2.2.

Oddly enough, hunterk has that same phone but has no problems with threaded video enabled.

Seems Nvidia managed to ‘fix’ Android only on their device it seems. I wonder by now how much the vendors are to blame for this.

I guess the Shield feature of being on “Pure Android” really holds some water.

sigh 2k block size for audio is huge enough as-is. (Low-latency interface uses ~256 block sizes …) I can probably hack in a workaround this weekend.

Squarepusher, did you see that some people that reported audio cracklings and slowdowns in r18 got it fixed by uninstalling and doing a fresh install ? Maybe worth a try for the guy with the HTC One.

+1 on this… really, everyone I know who has galaxys I try to convince to install cm… most android phones performs as shit just because of the fucking vendor firmware

Think you could toss a Mono Stereo toggle? ':x