Should the ready buffer be freed from the OpenSL ES audio player?

Just for confirmation. When an audio player created through OpenSL ES for Android finishes playing a buffer, is this buffer automatically freed by the garbage collector? Or do I need to free the buffer myself?

If this is the last, I can take some help. But until I publish the code, until I find out that I need to do it myself ...

+3
source share
2 answers

The buffer queue does not actually allocate buffer memory (or it needs to be freed), you pass pointers to the memory that you allocated through the "enqueue" function. You will need to free the memory that you allocated when you finish playing buffers.

OpenSL ES ​​++, , , API, , , , "destroy", ,

+5

, Enqueue , . , , , , , , GC - C!

Android OpenSL ES, , , .

+3

All Articles