版本
menu

Wwise SDK 2025.1.0
AkCmd_PostEvent结构体 参考

#include <AkCommandTypes.h>

Public 属性

AkPlayingID playingID
 Unique ID that will be associated with this playback. Use AK_SoundEngine_GeneratePlayingID() to generate a new unique playing ID. 更多...
 
AkUniqueID eventID
 Unique ID of the event 更多...
 
AkGameObjectID gameObjectID
 Associated game object ID 更多...
 
AkPlayingID actionTargetPlayingID
 Filters the "Target" of actions in the event by a playing ID. Set to AK_INVALID_PLAYING_ID to disable target filtering. Not all actions are affected by this; see AkActionOnEventType for the list of action types affected by this option. 更多...
 
AkUInt32 flags
 (optional) Bitmask: see AkCallbackType 更多...
 
AkEventCallbackFunc callback
 (optional) Callback function 更多...
 
void * callbackCookie
 (optional) Callback cookie 更多...
 
AkUInt32 numExternalSources
 (optional) Number of elements in externalSources array 更多...
 

详细描述

Posts an event. When this command is executed, the actions referenced in the event will be executed. The user is responsible for providing a new unique playingID value for every instance of this command. Re-using the same playing ID will cause actions in this event to be associated with an existing playback.

If numExternalSources is set to a value higher than 0, then the client is expected to call AK_CommandBuffer_AddExternalSources after the command:

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());

This command can fail for the following reasons:

  • AK_InvalidParameter: eventID is not valid or numExternalSources is higher than 0 and not enough external sources were added after the command.
  • AK_InsufficientMemory: Failed to allocate memory necessary to begin processing the command
  • AK_ResourceInUse: playingID was already used in a previous post event command. Use AK_SoundEngine_GeneratePlayingID() to ensure that a unique ID is generated for each post event command.
  • AK_IDNotFound: Event ID not found.
  • AK_PartialSuccess: When connected to the Wwise Profiler, command has been delayed to a later frame until Wwise synchronizes the event.
  • AK_MaxReached: Event Cooldown parameters for eventID did not allow the event to play.
参见

在文件 AkCommandTypes.h140 行定义.


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅