Table of Contents

Wwise Unreal Integration Documentation
Generating Sound Data

There are various ways to generate the Wwise Sound Data:

  • Via the Build menu: Click the dropdown arrow next to the Build button in the Unreal Toolbar, and select "Generate SoundData..."
  • Via the WAAPI or Wwise picker

When using Event-Based Packaging: Both these actions bring up the Generate Sound Data window:

The left half of this window lists the platforms that are available within both the Unreal project and the associated Wwise project. Select the platforms you wish to generate Sound Data for. Selecting no platform generates Sound Data for all platforms.

On the right is a list of configured languages in the Wwise project. Select the languages you wish to generate Sound Data for. Selecting no language generates Sound Data for all languages. If you wish to reduce Sound Data generation time, it is possible to skip generating localized Sound Data by selecting the "Skip generation of localized assets" checkbox.

When not using Event-Based Packaging: Both these actions bring up the Generate Sound Data window:

The left half of this window lists all available SoundBank assets within the Unreal project. Select the SoundBanks you wish to generate.

On the right is a list of platforms that are available within both the Unreal project and the associated Wwise project. Select the platforms you wish to generate Sound Data for. Selecting no platform generates Sound Data for all platforms.

Steps taken during Sound Data generation (Event-Based workflow only)

Sound Data Generation with WwiseConsole

When WAAPI is disabled or Wwise is not running, sound data is generated via WwiseConsole. A definition file is created on the fly and put into the user's TEMP directory and removed once WwiseConsole has finished executing. When using the GenerateSoundBanksCommandlet, the GeneratedSoundBanks folder is scanned for bank files and JSON metadata files. In Editor, a directory watcher is used to read bank data and JSON metadata files when they are available on disk, as WwiseConsole is still running. The Unreal task graph is used to run the sound data generation process in parallel, as much as possible.

Flow When receiving a new file through the directory watcher or scanning with a directory listener:

The input file is processed to determine its type and prepare reading tasks.

During the reading task, a media task is queued to create Unreal media assets and package WEM files inside those assets.

After WwiseConsole execution, the Integration:

  1. Waits for the remaining Directory Watcher processing tasks (Editor only);
  2. Scans the GeneratedSoundBanks folder for missing files that were not caught by the directory watcher (Editor only);
  3. Waits for the scan processing tasks, if any, to finish;
  4. Waits for the reading tasks to finish;
  5. Dispatches and waits for the media tasks;
    • Media tasks are dispatched after parsing tasks, because the maximum pre-fetch size for each media file needs to be found.
  6. Reloads all the sound data (Editor only).

Sound Data Generation with WAAPI

Generating the sound data via WAAPI is far quicker than using the WwiseConsole version. The bank data, the JSON metadata file and plugin info (for the Init Bank) are combined in the single result of the ak.wwise.core.soundbank.generated publication callback. The bank data is encoded using base64 in order to be delivered via JSON. The metadata file's JSON content is embedded directly in the WAAPI response. SoundBanks are generated in-memory on the Wwise side, thus removing a considerable amount of I/O calls. However, the media files are still written to disk in the .cache folder of the Wwise Project.

Flow When Generating Sound Data via WAAPI, the Integration:

  1. Subscribes to the ak.wwise.core.soundbank.generated publication with infoFile, bankData and pluginInfo set to true in the options;
  2. Creates the JSON request for ak.wwise.core.soundbank.generate and then calls it. It's a blocking call, returning only when Wwise has finished;
  3. Creates parse tasks for the incoming JSON response inside the callback of ak.wwise.core.soundbank.generated;
  4. After the call to ak.wwise.core.soundbank.generate is done, waits for all the parse tasks;
  5. Dispatches and waits for the media tasks. Media tasks are dispatched after parsing tasks because the maximum pre-fetch size for each media file needs to be found;
  6. Reloads all the sound data.