PDA

View Full Version : buffer enqueue question



choos3n
12-19-2011, 08:24 AM
Hi,

I am developing an application based on Open SL-ES for android and i have a question about buffer queues.

As far as i could understand when i enqueue a sound buffer, Open SL-ES does not make a copy of the data. My question is: Does android implementation delete the sound buffer, after it is played, or i have to delete it myself?


Andrei Comandatu.

gkasteng
03-27-2012, 02:41 PM
The buffer is owned by the application, and Enqueue merely saves a pointer to the data in the queue. After the callback indicating the buffer is complete, then the pointer is no longer in the queue and you are allowed to either free it or use that memory for another Enqueue.