About data size filled in the buffer

I want to write a simple example project to test recording in my platform. My platform supports OpenSL ES v1.0.1, and I have a following question.

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 version 1.1, 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 because I must know the data size in last buffer ?

Any suggestion would be greatly appreciated !

As you have noted, this information is not available in OpenSL ES 1.0.1. This was one of the reasons for the modification to the buffer queue APIs in OpenSL ES 1.1. As a possible workaround, you might try zeroing out the buffer ahead of time, and then at completion examine the buffer to see which portion is non-zero. This gives an approximation of how much was filled, however it does not handle correctly the case of recording silence.