Version
menu

◆ AK_CommandBuffer_Remove()

AKSOUNDENGINE_API void AK_CommandBuffer_Remove ( void *  in_buffer)

Remove the last-added command from the command buffer. This function can be useful when the buffer does not have enough space left for a command's extra data.

For example, using the SetListeners command requires adding a variable-size array:

auto cmd = (AkCmd_SetListeners*)AK_CommandBuffer_Add(buffer, AkCommand_SetListeners);
cmd->gameObjectID = 100;
cmd->numListenerIDs = mylistenerArray.size();
if (!AK_CommandBuffer_AddArray(buffer, sizeof(AkGameObjectID), mylistenerArray.size(), mylistenerArray.data()))
    AK_CommandBuffer_Remove(buffer); // Not enough space for the array, so remove the last command (SetListeners)

This function is a no-op when called on an empty command buffer.

Parameters
[in]in_bufferPointer to command buffer

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise