1

I need low-latency audio in my project, and Android 2.3 supports OpenSL ES. I have read documents and sample code and decide to use Android simple buffer queue to do the play and record. Now, I 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 !

Bohan Lu
  • 513
  • 2
  • 6
  • 20
  • In v1.0.1, it seems like that there would not be any method to do this, and I finally ignore and discard the last un-filled up buffer. Besides, I still found that the API "clear" in SimpleBufferQueue interface provided by Android dose not work for recorder, too. I must destroy the recorder object to release and clear the queue. – Bohan Lu Jan 12 '12 at 02:14

0 Answers0