Table of Contents
Wwise Unreal Integration Documentation
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.
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:
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:
- Waits for the remaining Directory Watcher processing tasks (Editor only);
- Scans the GeneratedSoundBanks folder for missing files that were not caught by the directory watcher (Editor only);
- Waits for the scan processing tasks, if any, to finish;
- Waits for the reading tasks to finish;
- 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.
- Reloads all the sound data (Editor only).
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:
- Subscribes to the
ak.wwise.core.soundbank.generatedpublication with infoFile, bankData and pluginInfo set to true in the options;
- Creates the JSON request for
ak.wwise.core.soundbank.generateand then calls it. It's a blocking call, returning only when Wwise has finished;
- Creates parse tasks for the incoming JSON response inside the callback of
- After the call to
ak.wwise.core.soundbank.generateis done, waits for all the parse tasks;
- 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;
- Reloads all the sound data.
Generated by 1.8.20