版本

menu_open
Wwise SDK 2018.1.11

◆ SetImageSource()

AKRESULT __cdecl AK::SpatialAudio::SetImageSource ( AkImageSourceID  in_srcID,
const AkImageSourceSettings in_info,
AkUniqueID  in_AuxBusID,
AkRoomID  in_roomID,
AkGameObjectID  in_gameObjectID = AK_INVALID_GAME_OBJECT 
)

Add or update an individual image source for processing via the AkReflect plug-in. Use this API for detailed placement of reflection image sources, whose positions have been determined by the client, such as from the results of a ray cast, computation or by manual placement. One possible use case is generating reflections that originate far enough away that they can be modeled as a static point source, for example, off of a distant mountain. The SpatialAudio API manages image sources added via SetImageSource() and sends them to the AkReflect plug-in that is on the aux bus with ID in_AuxBusID. The image source will apply to all registered spatial audio emitters, if AK_INVALID_GAME_OBJECT is passed for in_gameObjectID, or to one particular game object, if in_gameObjectID contains the ID of a valid registered spatial audio emitter. SetImageSource takes a room ID to indicate which room the reflection is logically part of, even though the position of the image source may be outside of the extents of the room.

This ID is used as a filter, so that it is not possible to hear reflections for rooms that the emitter is not inside. To use this feature, the emitter and listeners rooms must be specified using SetGameObjectInRoom. If you are not using the rooms and portals API, or the image source is not associated with a room, pass a default-constructed room ID.

Note: The AkImageSourceSettings struct passed in in_info must contain a unique image source ID to be able to identify this image source across frames and when updating and/or removing it later.

Each instance of AkReflect has its own set of data, so you may reuse ID, if desired, as long as in_gameObjectID and in_AuxBusID are different. If you are using the geometric reflections API on the same aux bus (as set in AkEmitterSettings) and game object(s), there is a small chance of ID conflict, because IDs for geometric reflections' image sources are generated internally using a hash function. If a conflict does occur, you will only hear one of the two reflections.

Note: For proper operation with AkReflect and the SpatialAudio API, any aux bus using AkReflect should have 'Listener Relative Routing' checked and the 3D Spatialization set to None in the Wwise authoring tool. See 总线实例 for more details.
参见
参数
in_srcID The ID of the image source being added.
in_info Image source information.
in_AuxBusID Aux bus that has the AkReflect plug in for early reflection DSP.
in_roomID The ID of the room that the image source is logically a part of; pass a default-constructed ID if not in, or not using, a room.
in_gameObjectID The ID of the emitter game object to which the image source applies. Pass AK_INVALID_GAME_OBJECT to apply to all emitter game objects.

此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅