Skip to content Skip to sidebar Skip to footer

Cannot Play Pcm > 60kb With The Androidsimplebufferqueue

I've initialized an AndroidSimpleBufferQueue such as values: SLDataLocator_AndroidSimpleBufferQueue bufferLocator = { SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, 2}; SLDataFormat_PC

Solution 1:

From the Specifications:

The buffers that are queued are used in place and are not required to be copied by the device, although this may be implementation-dependent. The application developer should be aware that modifying the content of a buffer after it has been queued is undefined and can cause audio corruption

So the memory must remains valid until the sound fully played.

Read the documentation and be aware of unintended struct copy :)

Post a Comment for "Cannot Play Pcm > 60kb With The Androidsimplebufferqueue"