Wwise SDK 2023.1.5

◆ SetImageSource()

AKSOUNDENGINE_API AKRESULT AK::SpatialAudio::SetImageSource ( AkImageSourceID  in_srcID,
const AkImageSourceSettings in_info,
const char *  in_name,
AkUniqueID  in_AuxBusID = AK_INVALID_AUX_ID,
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 applies all game objects that have a reflections aux send defined in the authoring tool, or only to a specific game object if in_gameObjectID is used.

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.
Note: It is possible for the AkReflect plugin to process reflections from both SetImageSource and the geometric reflections API on the same aux bus and game object, but be aware that image source ID collisions are possible. The image source IDs used by the geometric reflections API are generated from hashed data that uniquely identifies the reflecting surfaces. If a collision occurs, one of the reflections will not be heard. While collision are rare, to ensure that it never occurs use an aux bus for SetImageSource that is unique from the aux bus(es) defined in the authoring tool, and from those passed to SetEarlyReflectionsAuxSend.
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 Bus instances for more details.
See also
in_srcIDThe ID of the image source being added.
in_infoImage source information.
in_nameName given to image source, can be used to identify the image source in the AK Reflect plugin UI.
in_AuxBusIDAux bus that has the AkReflect plug in for early reflection DSP. Pass AK_INVALID_AUX_ID to use the reflections aux bus defined in the authoring tool.
in_gameObjectIDThe ID of the emitter game object to which the image source applies. Pass AK_INVALID_GAME_OBJECT to apply to all game objects that have a reflections aux bus assigned in the authoring tool.

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise