Version
menu

◆ AK_CommandBuffer_Init()

AKSOUNDENGINE_API struct AkCommandBufferHeader* AK_CommandBuffer_Init ( void *  out_buffer,
size_t  in_size 
)

Initialize a previously-allocated command buffer. Clears any previous data contained in the buffer. A buffer can be re-initialized multiple times with this function.

Note that it is the responsibility of the caller to allocate the buffer. Use AK_CommandBuffer_MinSize and AK_CommandBuffer_CmdSize to determine how much space to allocate for the planned buffer. Ensure the allocated buffer is aligned on 4 bytes.

Alternatively, use AK_CommandBuffer_Create to allocate and initialize the buffer in one call.

Parameters
[out]out_bufferPointer to buffer space
[in]in_sizeSize of buffer in bytes
Returns
Pointer to initialized command buffer header on success, NULL if buffer is smaller than the value returned by AK_CommandBuffer_MinSize or buffer not aligned on 4 bytes.

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise