Version
Wwise Unreal Integration Documentation
|
The WwiseProjectDatabase module is available to uncooked projects, including in the Editor. This module provides a memory-based database view of the current state of the Wwise project’s generated SoundBanks. Every value and piece of information available in the JSON metadata files produced when generating SoundBanks is accessible in the Project Database. This view is purely informative and only changes when the generated files are updated. References to structures in the database are thread-safe, even when a new database version is loaded asynchronously.
There are two representations of information in the database:
The Metadata structures are defined exactly like the JSON files that describe the generated SoundBanks metadata. No context is provided and there are few convenience tools. With very few exceptions, the member names in these structures are identical to those in the JSON files.
For the file definition itself, you start from a WwiseMetadataRootFile
object that defines the kind of optional root objects the file can declare. Then, the structures expose the different inner objects and values that can occur.
After they are loaded in memory, these structures present a clear image of the generated SoundBanks in a compact and efficient form.
Only one copy of this information is kept in memory in FWwiseRootDataStructure
and FWwisePlatformDataStructure
JSON files.
The Ref classes define each metadata object again but through a description of how to locate the necessary metadata. This class is helpful because the metadata in the generated SoundBanks is written with very little information duplication and instead uses references to various data structures. Therefore, Events have a media list referencing them by ID, but the metadata for that media, such as the file location, is defined in the higher-level SoundBank metadata.
For example, to point towards an Event’s Switch Container value, a Ref class keeps a shared pointer copy to the file’s root and contains directions to locate the Switch Container. The directions would be something like: this file, in the SoundBanks structure, the 1st SoundBank, the 4th declared Event, the 3rd declared Switch Container.
This is illustrated by the following code samples:
and this example media:
In essence, the Ref classes provide context. Hence, you can get the Switch Container information, and you can also get information about the class parents: the Event, the SoundBank, and the file.
Some referred types mandate supplemental information. For example, the Platform Information has its information split into two complementary files: the ProjectInfo.json
and the PlatformInfo.json
, so the platform Ref naturally contains two different structures. Similarly, some other referred types might reside in multiple locations, and the Ref class attempts to accommodate these particularities.
Finally, the Ref classes provide additional utilities. If you pass the necessary global maps, you can get supplemental information alongside the Ref classes that are included inside that particular Wwise object. For example, you can ask for the media requested in a particular Event’s definition, and it will return the media as Refs.
Because the Ref information is declared as the base and derived structs, in a Switch Container, you can request all of the Event’s Switch Container values and get the siblings simultaneously. The same is true for other types of information contained in Events.
At a higher level, the AnyRef class holds a pointer towards any kind of Ref structure. It contains the type and a shared pointer. There are limited operations available at the AnyRef level, such as retrieving the object’s Short ID, its GUID, and its name. For everything else, you can ask to cast the boxed Ref object to its type. It can point toward a Null object, so the AnyRef type is not a reference but a pointer to a Ref object.
The WwiseProjectDatabase module handles queries through its accessing methods. You can, for example, ask for all known SoundBanks or one particular SoundBank. The data itself is kept in its DataStructure member.
Inside the Data structure, there are two structures:
Typically, only one platform is loaded in the WwiseProjectDatabase at one time for cooking and packaging purposes; however, it is possible to load more than one platform.
Note: While working with your project’s Unreal Editor on a Mac, only the Mac platform must be loaded. |
The Data structure’s structs contain:
GeneratedPlatformFiles
property.JsonFiles
property.In addition, the Data structure allows templated accesses through functions such as GetRef
.
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise