版本
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.

参数
[in]in_bufferPointer to command buffer

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅