バージョン
menu

◆ AK_CommandBuffer_AddArray()

AKSOUNDENGINE_API void* AK_CommandBuffer_AddArray ( void *  in_buffer,
size_t  item_size,
AkUInt16  num_items,
const void *  items 
)

Copy an array of arbitrary-sized objects to the data payload of the last added command.

Some commands, like SetListeners, require additional data to complete the payload. First add the command, then call this function to complete the payload. For example:

auto cmd = (AkCmd_SetListeners*)AK_CommandBuffer_Add(buffer, AkCommand_SetListeners);
cmd->gameObjectID = 100;
cmd->numListenerIDs = mylistenerArray.size();
AK_CommandBuffer_AddArray(buffer, sizeof(AkGameObjectID), mylistenerArray.size(), mylistenerArray.data());

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

引数
[in]in_bufferPointer to command buffer
[in]item_sizeSize (in bytes) of each element in the array.
[in]num_itemsNumber of elements in the array.
[in]items(optional) Pointer to the first element in the array to copy. If NULL, no copy takes place; array space is merely reserved, pointer to the start of the space is returned, and client is responsible for writing to it.
戻り値
Pointer to the copied array, or NULL if there is not enough space left in the buffer.

このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう