Version

menu_open
Avertissement : certains renseignements protégés ne sont pas affichés sur cette page.
Assurez-vous d'être connecté si vous êtes un utilisateur avec une license pour des plateformes en particulier.

Samples

The following is a list of all the sample projects that are distributed as part of this SDK.

Refer to Directory Structure for more information regarding the location of sample code in the SDK.

The Integration Demo

The Integration Demo is an application containing multiple small demonstrations that show how to integrate various Wwise features in your game.

It currently contains demos showing how to implement:

  • Localization
  • Dynamic Dialogue
  • Using RTPCs
  • Footsteps with multiple variables
  • Environments
  • WAV File Markers
  • Interactive Music
  • Motion
  • Microphone usage

For more information on the Integration Demo, refer to Integration Demo Sample

Sample Plug-ins

The following source and effect plug-ins are installed with Wwise, but they are also part of this SDK as sample code.

Caution.gif
Caution: If you base one of your plug-ins on this sample code, be sure to refer to WwiseObject Elements for important information regarding plug-in IDs.

Sample Source Plug-ins

Sine Sample Source Plug-in

This simple source plug-in lets the Wwise user choose the frequency, gain and duration of the sine tone.

Location: "samples\Plugins\AkSineTone"

Tone Generator Sample Source Plug-in

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.

Location: "samples\Plugins\AkToneGenerator"

Audio Input Source Plug-in

This plug-in allows sound designers to use audio from an external source, for example a network stream, or a microphone connected to the PC's sound card.

Location: "samples\Plugins\AkAudioInput"

Refer to Audio Input Source Plug-in for more information on this plugin.

Sample Effect Plug-in

Delay Sample Effect Plug-in

This is a simple delay effect.

Location: "samples\Plugins\AkDelay"

Sample Audio Device Plug-in

Sample Audio Device Plug-in

This is a simple audio device plug-in routing the audio to a custom soundcard.(MAC and Windows only)

Location: "samples\Plugins\AkSink"

Game Integration Sample Code

AkCube Sound Engine Integration Sample Project

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.

Sound Engine Sample DLL

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.

Note.gif
Note: This project uses the Default Low-Level I/O Implementation discussed below.

Location: "samples\SoundEngine\Win32"

Default Low-Level I/O Implementation

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.

Sample Default Implementation Walkthrough describes the Default Low-Level I/O implementation samples in greater details.

Location (common):

  • "samples\SoundEngine\Common\AkFileLocationBase.h"
  • "samples\SoundEngine\Common\AkFileLocationBase.cpp"

Location (platform-specific):

  • "samples\SoundEngine\{Platform name}\AkDefaultIOHookBlocking.h"
  • "samples\SoundEngine\{Platform name}\AkDefaultIOHookBlocking.cpp"
  • "samples\SoundEngine\{Platform name}\AkDefaultIOHookDeferred.h"
  • "samples\SoundEngine\{Platform name}\AkDefaultIOHookDeferred.cpp"

Additionally, you may use the CAkDefaultLowLevelIODispatcher class to manage I/O systems with multiple devices.

Location (common):

  • "samples\SoundEngine\Common\AkDefaultLowLevelIODispatcher.h"
  • "samples\SoundEngine\Common\AkDefaultLowLevelIODispatcher.cpp"

File Package Low-Level I/O Implementation

This sample enhances the default Low-Level I/O implementation by supporting usage of file packages generated using the File Packager utility (see File Packager Utility). Refer to Low-Level I/O for an explanation of the concepts behind the Low-Level I/O module. There is a description of the features of the File Package Low-Level I/O implementation at the end of this section (Sample File Package Low-Level I/O Implementation Walkthrough).

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:

  • "samples\SoundEngine\{Platform name}\AkFilePackageLowLevelIOBlocking.h"
  • "samples\SoundEngine\{Platform name}\AkFilePackageLowLevelIODeferred.h"

File Packager Utility

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.

Using File Packages

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.

Copy Streamed Files Utility

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...).

Location: "samples\Tools\CopyStreamedFiles"

SoundFrame Sample Code

As explained in Using SoundFrame, the SoundFrame lets you connect Wwise to other authoring tools such as 3D applications and game editors. Refer to Using SoundFrame for more information.

SoundFrame Test Application

This is a sample application that demonstrates the use of the SoundFrame API.

Location: "samples\SoundFrame\SFTest"

Car Sim Sample Application

The Car Sim is a sample application that uses SoundFrame to simulate car engine physics. You can use the Car Sim to simulate the various car engine sounds before the game engine is complete. It allows you to make multiple changes to RTPC values simultaneously.

More information is available in samples\SoundFrame\CarSim\Win32\Help\WwiseCarSimHelp.chm.

Location: "samples\SoundFrame\CarSim"

Source Control Sample Code

Detailed information on these sample plug-ins is available in Source Control Plug-in Sample Code.

Basic Source Control Sample Plug-in

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.

Location: "samples\SourceControl\SourceControlSample"

Refer to Basic Source Control Sample Plug-in for more information.

Perforce Source Control Sample Plug-in

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.

Location: "samples\SourceControl\Perforce"

Refer to Perforce Source Control Sample Plug-in for more information.

Subversion Source Control Sample Plug-in

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.

Note.gif
Note: This plug-in is currently available in a 32-bit version only.

Location: "samples\SourceControl\Subversion"

Refer to Subversion Source Control Sample Plug-in for more information.


Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise