This more advanced source plug-in gives more control to the Wwise user, adding the possibility to use different waveforms, sweeping across a predefined frequency range, specifying a custom envelope, and adding randomization of the frequency.

This is a complete integration of the Wwise Sound Engine into an open-source first-person shooter game. If you have not already done so, you can download the game and Wwise project from the Audiokinetic download page. For more assistance and information, contact support.

This DLL combines the various modules of the sound engine and simplifies integration by providing simple functions for initialization, termination, and so on. If you choose to combine all sound engine-related libraries into a single DLL to use in the Windows version of your game, you can start from this sample project to create that DLL. Refer to the AkCube Sound Engine Integration Sample Project for an example of how to use this DLL in your game.

Implementing the Low-Level I/O interfaces (defined in AkStreamMgrModule.h) is the preferred method of integrating Wwise I/O into your game. The SDK provides default, platform-specific implementations of the Low-Level I/O. Refer to Streaming / Stream Manager for an overview of Wwise I/O.

These samples may be used as is, or as a starting point for implementing your own Low-Level I/O system. Integrating Wwise I/O is a straightforward explanation on how and why you should use these samples.

You can use file packages directly in your game by including the classes below to your game, along with the code of the Default Low-Level I/O. You can also edit this implementation, and the File Packager, to include your own game-specific files. This is useful especially if you plan to use Audiokinetic's Stream Manager for all I/O in your game. Or, the code can be seen as a proof of concept in order to help you implement your own strategy for mapping file IDs to file descriptors.

Location:

"samples\SoundEngine\Common\AkFilePackageLowLevelIO.h"

"samples\SoundEngine\Common\AkFilePackageLowLevelIO.inl"

"samples\SoundEngine\Common\AkFilePackage.h"

"samples\SoundEngine\Common\AkFilePackage.cpp"

"samples\SoundEngine\Common\AkFilePackageLUT.cpp"

"samples\SoundEngine\Common\AkFilePackageLUT.cpp"

CAkFilePackageLowLevelIO<> is a template class that adds services to the default, platform-specific implementations of the low-level I/O hooks. The concrete definitions of File Package Low-Level I/O classes are in the platform-specific folders:

The File Packager utility is intended to create file packages that can be used with the File Package Low-Level I/O mentioned above (File Package Low-Level I/O Implementation). Its executable is installed with Wwise, in the Tools\ subfolder. The Wwise SDK provides the source code of this utility, that you can enhance or simply consult.

Location: "samples\Tools\FilePackager"

The File Packager concatenates all the files generated by Wwise, for a given platform of a given project, that are meant to be read by the sound engine at run-time, that is, bank and streamed audio files. It is generally used after generating SoundBanks. It has an user interface, in which you can edit the order of the files of the package, and save it. It can also be launched in "generate mode", which directly generates a file package, that can be loaded by the File Package Low-Level I/O. Refer to the Wwise Help for details on the usage of the File Packager, its command line arguments, and on specifying a command line to be executed automatically at the end of the SoundBank generation process. The rest of this section briefly goes through the classes of the File Packager code.

The File Packager is written in C#. The class GenerateModeAppContext handles the application in its "generate mode", and EditModeForm handles it in its "edit mode" (UI). The classes grouped in the "Package Layout" folder handle the business logic of the edit mode UI, and persistence of the layouts. Packaging is based on the content of SoundBanksInfo.xml files (parsed with the help of classes found in the "Info File" folder). SoundBanksInfo.xml files enumerate all bank and streamed audio files of a project, per platform (refer to SoundBanksInfo.xml for more information).

The application calls FilePackageGenerator::Generate() to perform file packaging, which uses the classes located in the "File package header" folder. Here are the steps of file packaging (SoundBanksInfo.xml is referred to as the INFO file):

The INFO file is parsed to find all language names of the project. A map of automatically-generated language IDs is built (LanguageMap class).

An array of IncludedFiles is built for all SoundBanks found in the INFO file (FileLUT). It is sorted by file ID, then by language ID.

An array of IncludedFiles is built for all Streamed Audio Files found in the INFO file (FileLUT). It is sorted by file ID, then by language ID.

The total header size is computed.

The order of included files is determined, based on a loaded layout if any (FileOrganizer) .

The IncludedFiles of both LUT are revisited to compute the starting block, taking into account necessary padding due to the block size (FileOrganizer).

The whole header is written in the output file.

Referenced files are copied and appended to the output file, with proper zero-padding.

A UI form displaying generation progress and messages is implemented in class Progress ("UI" folder). It listens to progress notifications of the FilePackageGenerator.

Refer to the Wwise Help for a description of the File Packager's command line arguments.

In order to use file packages (created with the File Packager Utility or any other tool), you need to write the low-level I/O code to handle file packages. Basically, it needs to specify the offset of the requested file in the package with the proper AkFileDesc::uSector() value.

The class CAkFilePackageLowLevelIO is provided as sample code. It extends the Default Low-Level I/O and can be used as-is with file packages created with the File Packager. You simply need to instantiate a CAkFilePackageLowLevelIO instead of a CAkDefaultLowLevelIO. Then, before doing anything, you need to load the file package explicitly by calling CAkFilePackageLowLevelIO::LoadFilePackage(). The Low-Level I/O will open and parse the file package's header and build its look-up tables. It does not load the actual packaged files in memory. Then, every time the Stream Manager calls AK::StreamMgr::IAkFileLocationResolver::Open(), Wwise searches for the file in all packages. If it is not found, the default implementation is called.

The order in which packages are searched in this sample corresponds to the opposite order in which they were loaded (using LoadFilePackage()). If you are implementing a DLC with file packages, your game should load the "base" (default) file package first, then the DLC packages. CAkFilePackageLowLevelIO::Open() will, therefore, search the DLC packages first. If a file exists in both a DLC package and the "base" package, the one in the DLC package will be picked.

See a brief presentation of this sample implementation in the above listed File Package Low-Level I/O Implementation. There, you will find links to other relevant parts of the documentation (such as the Low-Level I/O sample code walk-throughs).

The CAkFilePackageLowLevelIO and associated File Packager Utility code can be used as a starting point to implement more complex file packaging solutions.

The Copy Streamed Files utility may be used in place of, or along with the File packager. It is implemented as an external tool which is given as sample code so you can modify it or use it as the base for your own tool. It is written in C#.

This tool copies streamed files from the project's cache to the SoundBanks folder. Its executable is installed with Wwise, in the Tools subfolder. If you modify this tool, be sure to update the executable on all machines running Wwise in your company (developers, sound designers, build machines...).

This is a sample DLL project that shows how to create a source control plug-in for Wwise. It does not perform source control operations, but serves as a framework for developing these types of plug-ins.

This is the Perforce plug-in that is included with Wwise by default. It lets you perform Perforce operations from within the Wwise authoring application. Full source code is included, to give you a complete example of a source control plug-in. It also allows you to customize and enhance the plug-in if you want to.

This is the Subversion plug-in that is included with Wwise by default. It lets you perform Subversion operations from within the Wwise authoring application. Full source code is included, to give you a complete example of a source control plug-in. It also allows you to customize and enhance the plug-in if you want to.