Version

menu_open
Attention : vous avez été redirigé vers la plus récente documentation correspondant à votre version générale ( 2022.1.17.8543 ). Si vous souhaitez accéder à la documentation de votre version précise, veuillez télécharger la documentation hors ligne depuis l'Audiokinetic Launcher et sélectionner l'option de documentation Offline dans l'application de création Wwise.
link
Wwise SDK 2022.1.17
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:

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: If you base one of your plug-ins on this sample code, be sure to refer to Plug-in Type 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: 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.

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.

Location: "SDK\samples\SourceControl\Subversion"

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

The Wwise Authoring API


The Wwise Authoring API (WAAPI) contains multiple small demonstrations that show how to use various features and functions for the following three programming languages: C++, JavaScript, and Python.

The C++ folder contains a demo showing how to implement:

  • SampleClient
    • Can run Wwise from the command line and open a version of Wwise without the user interface.
    • Location: "SDK\samples\WwiseAuthoringAPI\cpp\SampleClient"

The JavaScript folder contains demos showing various protocols to connect to Wwise such as with:

  • HTTP POST
    • Location: "SDK\samples\WwiseAuthoringAPI\js\hello-wwise-node-http"
  • WAMP
    • Location: "SDK\samples\WwiseAuthoringAPI\js\hello-wwise-node-wamp"
  • Web WAMP
    • Location: "SDK\samples\WwiseAuthoringAPI\js\hello-wwise-web-wamp"

In addition to providing simple connection examples, the JavaScript folder also contains some more hands-on examples which explore different functions available through the Wwise Authoring Protocol:

  • Web transport
    • The web transport allows commands to be launched from a web page.
    • Location: "SDK\samples\WwiseAuthoringAPI\js\web-transport"
  • XY-pad
    • The XY-pad allows the modification of two game parameters at the same time within a 2-dimension area, with a single movable point.
    • Location: "SDK\samples\WwiseAuthoringAPI\js\xy-pad"
  • selection
    • The selection sample shows how to use the selection functions of the Wwise Authoring API.
    • Location: "SDK\samples\WwiseAuthoringAPI\js\xy-pad"

The Python folder contains demos showing various protocols to connect to Wwise with:

  • HTTP POST
    • Location: "SDK\samples\WwiseAuthoringAPI\python\hello-wwise-http"
  • WAMP
    • Location: "SDK\samples\WwiseAuthoringAPI\python\hello-wwise-wamp"
See also

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