版本
menu

Wwise SDK 2025.1.2
AkCmd_SetEffect结构体 参考

#include <AkCommandTypes.h>

Public 属性

AkUInt64 nodeID
 ID of the bus, Container node, or output device. When nodeType is set to AkNodeType_AudioDevice, a value of 0 designates the main (default) output. 更多...
 
AkUInt8 nodeType
 Type of node that nodeID refers to. Must be a valid value from the AkNodeType enumeration. 更多...
 
AkUInt8 fxIndex
 Effect slot index (0-254) 更多...
 
AkUniqueID fxSharesetID
 ShareSet ID of the effect; pass AK_INVALID_UNIQUE_ID to clear the Effect slot 更多...
 

详细描述

Sets an Effect ShareSet at the specified slot of a container, bus, or output device.

备注: Replacing effects is preferably done through a Set Effect Event Action.

This operation adds a reference on the audio node to an existing ShareSet.

To specify a bus, set nodeType to AkNodeType_Bus. The bus can be an Audio Bus or an Auxiliary Bus.

To specify an output device, set nodeType to AkNodeType_AudioDevice. The ID can refer to a specific ID returned by AK::SoundEngine::GetOutputID or 0 to designate the main (default) output device. In this case, only audio device effect sharesets are accepted.

When specifying any other container (e.g. Switch, Blend, Sound SFX, etc.) set nodeType to AkNodeType_Default.

备注: This function has unspecified behavior when adding an Effect to a currently playing Bus which does not have any Effects, or removing the last Effect on a currently playing bus.
备注: This function will replace existing Effects on the node. If the target node is not at the top of the hierarchy and is in the Containers hierarchy, the option "Override Parent" in the Effect section in Wwise must be enabled for this node, otherwise the parent's Effect will still be the one in use and SetEffect will have no impact.

This command can fail for the following reasons:

  • AK_InvalidParameter when nodeID is an invalid ID, or when fxIndex or nodeType is out of range.
  • AK_IDNotFound when either the Node ID or the Shareset ID are not present in the Init bank.
  • AK_RenderedFX when the current effect in the slot is rendered at bank-generation time (rendered effects cannot be replaced).
  • AK_NotCompatible when nodeType is AkNodeType_AudioDevice and the effect shareset is not an output device effect.
  • AK_InsufficientMemory when there is not enough memory to complete the operation.
参见

在文件 AkCommandTypes.h1046 行定义.


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅