Version
menu

◆ AK_CommandBuffer_AddExternalSources()

AKSOUNDENGINE_API void* AK_CommandBuffer_AddExternalSources ( void *  in_buffer,
AkUInt32  in_uNumSources,
const struct AkExternalSourceInfo in_pSources 
)

Copy an array of external sources to the data payload of the last added command.

When posting an event using external sources, PostEvent command requires additional data to complete the payload. First add the command, then call this function to complete the payload. For example:

auto cmd = (AkCmd_PostEvent*)AK_CommandBuffer_Add(buffer, AkCommand_PostEvent);
// Fill out the command...
cmd->numExternalSources = myExternalSourcesArray.size();
AK_CommandBuffer_AddExternalSources(buffer, myExternalSourcesArray.size(), myExternalSourcesArray.data());

Use AK_CommandBuffer_ExternalSourcesSize to calculate the size required to store the data.

Parameters
[in]in_bufferPointer to command buffer
[in]in_uNumSourcesNumber of elements in the array.
[in]in_pSourcesPointer to the first element in the array.
Returns
Pointer to the copied array, or NULL if there is not enough space left in the buffer.
See also
AkCmd_SA_PostEvent

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