バージョン
menu

Wwise SDK 2025.1.0
AkCmd_PostEvent 構造体

#include <AkCommandTypes.h>

公開変数類

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からはじめよう