Version
menu

◆ AK_CommandBuffer_AddString()

AKSOUNDENGINE_API void* AK_CommandBuffer_AddString ( void *  in_buffer,
const char *  str 
)

Copy a null-terminated string to the data payload of the last added command.

Some commands, like RegisterGameObject, require a string to complete the payload. First add the command, then call this function to complete the payload. For example:

auto cmd = (AkCmd_RegisterGameObject*)AK_CommandBuffer_Add(buffer, AkCommand_RegisterGameObject);
cmd->gameObjectID = 100;
AK_CommandBuffer_AddString(buffer, "Player Emitter");

Use AK_CommandBuffer_StringSize to calculate the size required to store the string.

Parameters
[in]in_bufferPointer to command buffer
[in]strPointer to null-terminated string
Returns
Pointer to the copied string, or NULL if there is not enough space left in the 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