Version

menu_open
Wwise SDK 2023.1.8
Quick Start Sample Integration - Environments and Game-defined Auxiliary Sends

Environmental Effect Example

First the user must create Auxiliary busses in the Wwise project that will represent the environments, one aux bus per environment. The option "Use game-defined auxiliary sends" must have been set in the object properties or in the object it inherits its properties from for sounds that should use this feature. For the game to use these parameter sets, the effect in question must be registered in the sound engine. You do this in exactly the same way you register other effect plug-ins (see Plug-in Example for more details), as demonstrated in the following example:

To allow the initialization functions to be found at link time, your C++ project must link with the appropriate plug-in library. Refer to Overview of Libraries and Header Files Contained in the SDK for more information on libraries.

Refer to Integration Details - Environments and Game-defined Auxiliary Sends for information on the meaning of these ratios.

Note: The names passed to AK::SoundEngine::GetIDFromString() are the names of the Auxiliary busses as defined in Wwise. Refer to Using IDs or Strings (Unicode or ANSI) for more information.

In the sample program you can experiment with Environments by moving the first three sliders in the "Environments: Footsteps" group, which let you set the ratio (0% on the left, to 100% on the right) for Dry, Hangar, and Tunnel environments.

Refer to Integration Details - Environments and Game-defined Auxiliary Sends for more details, and to Integration Demo Sample for the sample project.

Obstruction/Occlusion Example

Obstruction and occlusion can be computed for each game object relative to each listener, as it depends on the environment and positions of game objects and listeners.

Setting obstruction and occlusion is done by calling AK::SoundEngine::SetObjectObstructionAndOcclusion() as demonstrated here:

In the sample program you can experiment with Obstruction and Occlusion by moving the last two sliders in the "Environments: Footsteps" group which let you set the ratio (0 to 100%) for obstruction and occlusion.

Refer to Obstruction and Occlusion with Game-defined Auxiliary Sends for more details, and to Integration Demo Sample for the sample project.

Note: This sample code comes from the Sound Engine Integration Sample Project available in the Samples section. Refer to Integration Demo Sample for more information.
AkReal32 fControlValue
Definition: AkTypes.h:868
Auxiliary bus sends information per game object per given auxiliary bus.
Definition: AkTypes.h:865
float AkReal32
32-bit floating point
AKSOUNDENGINE_API AKRESULT SetObjectObstructionAndOcclusion(AkGameObjectID in_EmitterID, AkGameObjectID in_ListenerID, AkReal32 in_fObstructionLevel, AkReal32 in_fOcclusionLevel)
AKSOUNDENGINE_API AKRESULT SetGameObjectAuxSendValues(AkGameObjectID in_gameObjectID, AkAuxSendValue *in_aAuxSendValues, AkUInt32 in_uNumSendValues)
AKSOUNDENGINE_API AkUInt32 GetIDFromString(const char *in_pszString)
AKSOUNDENGINE_API AKRESULT SetGameObjectOutputBusVolume(AkGameObjectID in_emitterObjID, AkGameObjectID in_listenerObjID, AkReal32 in_fControlValue)
static const AkGameObjectID AK_INVALID_GAME_OBJECT
Invalid game object (may also mean all game objects)
Definition: AkTypes.h:94
AkGameObjectID listenerID
Game object ID of the listener associated with this send. Use AK_INVALID_GAME_OBJECT as a wildcard to...
Definition: AkTypes.h:866
AKSOUNDENGINE_API AK::IAkGlobalPluginContext * GetGlobalPluginContext()
AkAuxBusID auxBusID
Auxiliary bus ID.
Definition: AkTypes.h:867

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