Version

menu_open
Wwise SDK 2024.1.0
Defining C++ Project Settings

C++14 Compiler Requirements

The Wwise SDK headers require a valid C++14 (or later) compiler. Make sure your compiler can parse C++14 code. See Platform Requirements for a list of supported compilers.

Release Configuration Settings

For optimization purposes, the release configuration of your project has slightly different requirements than the development configuration.

Define AK_OPTIMIZED Symbol

You must define the AK_OPTIMIZED symbol in the release configuration of your project (it might be called "Ship", "Retail", or something similar in the configuration used to build the retail version of your game).

This symbol is used in various places to avoid compiling unnecessary code in the release version.

Exclude Communication Code

The Wwise sound engine lets you enable communication between Wwise and your game so the Wwise user can perform in-game mixing and profiling. However, this communication is not available in the release configuration for performance reasons.

If you enable communication in your game, exclude the code from the release version of your game by surrounding it with #ifndef AK_OPTIMIZED / #endif.

Windows-Specific Considerations

The recommendations and requirements in this section apply to development on Windows only.

Using wchar_t

If you call one or many Wwise sound engine functions that use the wchar_t type, you need to enable the "Treat wchar_t as Built-in type" option in your project's settings to ensure proper linking to the sound engine libraries. To do so, go to Configuration Properties > C/C++ > Language, and set "Treat wchar_t as Built-in Type" to "Yes". This sets the "/Zc:wchar_t" compile flag.

However, this is not required if you do not call any of the functions of the sound engine that use the wchar_t type. Note that all these functions have counterparts that use the char type instead.

If you call a function that uses wchar_t, but do not enable the "Treat wchar_t as Built-in Type" setting in your project, you will receive a link error similar to this one: unresolved external symbol "enum AKRESULT __cdecl AK::SoundEngine::LoadBank(unsigned short const *,long,unsigned long &)", because the compiler incorrectly interprets the function AK::SoundEngine::LoadBank(const wchar_t *,long,unsigned long &) as AK::SoundEngine::LoadBank(unsigned short const *,long,unsigned long &).

Warning: We recommend that you enable the "Treat wchar_t as Built-in Type" setting in your project. If you do not want to enable it, please read the following.

Pay special attention to the AkOSChar type, which has a typedef of wchar_t on some platforms. This type is used with methods that involve disk I/O. More specifically, it is used by the Stream Manager (AK::IAkStreamMgr) and Low-Level I/O (AK::StreamMgr::IAkLowLevelIOHook) interfaces.

If Audiokinetic's default Stream Manager is used as your I/O manager throughout your game, you must enable the "Treat wchar_t as Built-in Type" setting on platforms where AkOSChar have a typedef of wchar_t. Typically, though, the Wwise sound engine is the only client of the Stream Manager. In such a case it is not necessary to enable the "Treat wchar_t as Built-in Type" setting in your project.

The "Treat wchar_t as Built-in Type" setting does not cause problems with the Low-Level I/O API because you don't typically call it, but implement it instead.

Note that the File Package Low-Level I/O sample (see File Package Low-Level I/O Implementation) calls some methods of the sound engine that use the wchar_t type when AkOSChar has a typedef of wchar_t. If you want to use this sample in your project without enabling the "Treat wchar_t as Built-in Type" setting, you must modify some parts of it to convert wchar_t strings into char strings wherever it is necessary. You can use the AKPLATFORM::AkWideCharToChar() helper to do so. It is defined in AK/Tools/Common/AkPlatformFuncs.h.

For more information on how to integrate Wwise I/O, refer to Streaming / Stream Manager.

Single DLL Requirements

In a Windows game, if you are using a DLL to wrap everything that is related to the Wwise sound engine, such as the sample AkSoundEngineDLL project (see below), you need to define AKSOUNDENGINE_DLL in the project that depends on it (game executable or another DLL) to correctly import the symbols of the sound engine API.

Projects that link statically with the Wwise sound engine's libraries must not define AKSOUNDENGINE_DLL.

AkSoundEngineDLL Sample Project

This Sound Engine Integration Walkthrough guides you through a basic integration, step by step, involving the initialization and handling of several modules individually. If you prefer to work with a sample DLL project, one is included in the SDK. The AkSoundEngineDLL project wraps some of the integration tasks into high-level calls, like "Initialize" and "Terminate". It is not used in this example so you can view each step individually, but you can use the DLL, or a modified version of it, in your own game. Refer to the AkCube Sound Engine Integration Sample Project for an example of how to use that DLL.

Note: It is necessary to install the Visual Studio 2017 package in order to use AkSoundEngineDLL on Windows.


Note that the AkSoundEngineDLL project also contains an implementation of the Low-Level I/O, which you can replace by yours if desired. For more information on the Low-Level I/O, refer to Low-Level I/O.


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