Version

menu_open
Warning: you were redirected to the latest documentation corresponding to your major release ( 2022.1.17.8543 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Wwise SDK 2022.1.17
SoundBank Integration Samples

The following sections contain sample integrations of various SoundBank management strategies. These strategies are described in Strategies for Managing SoundBanks in the Wwise help.

Note: The use of PrepareEvent is incompatible with LoadBank, using in-memory data.


The "All-in-one" SoundBank

With this strategy, all event content, sound structure data, and media files are stored in one SoundBank. For a discussion of this strategy and its implementation in Wwise Authoring, see The “All-in-one” SoundBank in the Wwise Help.

Since there is only one SoundBank for this game, load it when initializing the game. As always, the sound engine must be initialized first.

Multiple Complete SoundBanks

This strategy works well for single player games, where all possible sounds depend on the location of the player in the game. For a discussion of this strategy and its implementation in Wwise Authoring, see Multiple Complete SoundBanks in the Wwise Help.

In the game, load the correct bank at the correct time. For example, the game could load the general bank at the beginning and then load the other banks based on the player's actual location in the game. Note that some games will need to have enough memory to load more than one "level" at a time to allow for transitions between levels.

As an alternative to LoadBank(), you could prepare your SoundBanks using AkBankContent_All. This has the advantage of avoiding duplicating media in memory. See Preparing Banks.

Micromanaging Media

Consider this strategy for complex games with many assets. For a discussion of this strategy and its implementation in Wwise Authoring, see Micromanaging Media in the Wwise Help.

In the game, load the common SoundBanks at the beginning of your game then load the other SoundBanks when they are required. For example, the game could load the Event SoundBank and the common footsteps SoundBank at the beginning, then load the other SoundBanks based on the player's location in the game.

Preparing Action Events

Consider this strategy if you require a high level of media granularity to keep memory usage low and do not want to manage the structure and media related to Events. For a discussion of this strategy and its implementation in Wwise Authoring, see Preparing Action Events in the Wwise Help.

In the game, load the Events' SoundBank at the beginning of the game, then prepare the Events when they are required in game. The corresponding structures and media will be loaded automatically.

Preparing Events and Game Syncs (Switches and States)

This strategy is like Preparing Action Events, but with more control over the media that gets loaded when Events are prepared. For a discussion of this strategy and its implementation in Wwise Authoring, see Preparing Events and Game Syncs (Switches and States) in the Wwise Help.

The order in which you call AK::SoundEngine::PrepareEvent and AK::SoundEngine::PrepareGameSync is not important. Each time the state changes, the media pool is updated by crossmatching the Events and the game syncs.

See also
AKSOUNDENGINE_API AKRESULT PrepareEvent(PreparationType in_PreparationType, const char **in_ppszString, AkUInt32 in_uNumEvent)
Audiokinetic namespace.
AKSOUNDENGINE_API AKRESULT PrepareGameSyncs(PreparationType in_PreparationType, AkGroupType in_eGameSyncType, const char *in_pszGroupName, const char **in_ppszGameSyncName, AkUInt32 in_uNumGameSyncs)
AKSOUNDENGINE_API AKRESULT Init(AkInitSettings *in_pSettings, AkPlatformInitSettings *in_pPlatformSettings)
AkUInt32 AkBankID
Run time bank ID.
Definition: AkTypes.h:143
AKRESULT
Standard function call result.
Definition: AkTypes.h:199
AKSOUNDENGINE_API AKRESULT LoadBank(const char *in_pszString, AkBankID &out_bankID, AkBankType in_bankType=AkBankType_User)
@ Preparation_Unload
PrepareEvent() will unload required information to play the specified event.
#define NULL
Definition: AkTypes.h:46
@ AK_Success
The operation was successful.
Definition: AkTypes.h:201
AKSOUNDENGINE_API void GetDefaultInitSettings(AkInitSettings &out_settings)
@ Preparation_Load
PrepareEvent() will load required information to play the specified event.
AKSOUNDENGINE_API AKRESULT UnloadBank(const char *in_pszString, const void *in_pInMemoryBankPtr, AkBankType in_bankType=AkBankType_User)
AKSOUNDENGINE_API void GetDefaultPlatformInitSettings(AkPlatformInitSettings &out_platformSettings)

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