About data size filled in the buffer

Posted by Bohan Lu on Stack Overflow See other posts from Stack Overflow or by Bohan Lu
Published on 2011-11-18T09:45:33Z Indexed on 2011/11/18 9:50 UTC
Read the original article Hit count: 266

Filed under:
|
|

I need low-latency audio in my project, and I know Android 2.3 supports OpenSL ES. I have read documents and sample code and I decide to use Android simple buffer queue to do the play and record. I now try to write a simple application to do the test.

However, I have some questions about recording. If I set the recorder stop when it is recording, how do I know the exact number of bytes filled in the last buffer if it is not filled up ?

In 1.1 version, the callback function has some parameters about buffer and its filled data, but there is no such parameters in version 1.0.1.

Is there any way to get this information ?

Any suggestion would be greatly appreciated !

© Stack Overflow or respective owner

Related posts about android

Related posts about audio