about low latency opensl es programing

226 views
Skip to first unread message

bobi wang

unread,
Jan 16, 2014, 12:16:24 AM1/16/14
to andro...@googlegroups.com
I have read the opensl doc in NDK.
at the topic "performance",I don't understand about "The lower output latency path is used only if the application requests a buffer count of 2 or more, and a buffer size and sample rate that are compatible with the device's native output configuration.".
what is mean that "a buffer count of 2 or more"?
Is it a example code about that?

Glenn Kasten

unread,
Jan 21, 2014, 1:12:18 PM1/21/14
to andro...@googlegroups.com
This is referring to the application-level buffer count, which is specified when you create the buffer queue ... see the corresponding field pcm buffer queue data locator structure. 

There was a recent change that removed the requirement for >= 2 app-level buffers. 
Your note reminds me that the documentation needs to be updated regarding this.

Michael Moussa

unread,
Jan 23, 2014, 8:34:22 AM1/23/14
to andro...@googlegroups.com
Glenn, in what API level was this change made? Was it 19 (Android 4.4)

Thanks,
Mike

Glenn Kasten

unread,
Jan 24, 2014, 10:01:29 AM1/24/14
to andro...@googlegroups.com
The change was committed on Thu Jun 06 10:11:52 2013 -0700
but I don't recall which Android version that corresponds to.

Michael Moussa

unread,
Jan 25, 2014, 1:10:07 PM1/25/14
to andro...@googlegroups.com
Thanks Glenn, I saw the commit date, just was not sure if there was some easy way to know what version it made it in. I'll check out the various git branches to see where it landed. Based on the date it had a chance to make it in for 4.3, but maybe it didnt make it until 4.4.

Mike

Achim Leubner

unread,
Aug 28, 2015, 5:03:05 PM8/28/15
to android-ndk
It's an old thread, but anyway, in case somebody wonders: looks like it didn't make into 4.3. But it seems to be in 4.4.

Btw. it also looks like the requirement never was "exact" 2 buffers, but "at least". Oh and canUseFastTrack() also checks a blacklist of opensl interfaces.

Achim
Reply all
Reply to author
Forward
0 new messages