Version

menu_open
Warning: you were redirected to the latest documentation corresponding to your major release ( 2022.1.17.8543 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Warning : Some protected information on this page is not displayed.
Ensure you are logged in if you are a licensed user for specific platforms.
Wwise SDK 2022.1.17
Integration Demo Sample

The Integration Demo application contains a series of demonstrations that show how to integrate various features of the sound engine in your game.

Note: All code presented in this section is available in a sample project in the samples\IntegrationDemo\ directory.

The Wwise Project

The Wwise project for this program is also available in samples\IntegrationDemo\WwiseProject.

Note: The Wwise project for this program uses various audio file conversion formats, some of which may not be available depending on which platforms are supported by your Wwise installation. After opening the project in Wwise, you may see warnings such as:

\Actor-Mixer Hierarchy\Dialogues\Captain_A\UNA-BM-AL_01\UNA-BM-AL_01 uses the conversion plugin 'XMA', which is not installed.

You can remove these messages by changing the conversion format for all unavailable platforms to PCM. Refer to the following topic in the Wwise User Guide for more information: Converting Audio Files.

SoundBanks for this project are also installed with the SDK in the samples\IntegrationDemo\WwiseProject\GeneratedSoundBanks folder.

To regenerate the SoundBanks, make sure to do the following in the SoundBank Manager:

  • Check all banks in the SoundBanks list.
  • Check off all platforms that are being tested.
  • Check all languages in the Languages list.

Once these settings are correct, you can click on Generate in the SoundBank Manager to generate the banks.

Building and Running the Demo

The Integration Demo binaries are available in the \[Debug|Profile|Release]\bin directory. If you would like to rebuild the application yourself, follow these steps:

Windows

  • Confirm that the version of the DirectX SDK installed on your machine matches the one mentioned in Platform Requirements.
  • Generate the Integration Demo SoundBanks for Windows in their default paths.
  • Open the solution found in samples\IntegrationDemo\Windows and build using the desired configuration.

To run the Integration Demo, simply launch the executable found in the directory mentioned above.

Mac

  • Confirm that the version of XCode installed on your machine matches the one mentioned in Platform Requirements.
  • Open the Xcode project found in samples/IntegrationDemo/Mac and build using the desired configuration.
  • To run the Integration Demo, simply launch the executable found in the directory Mac/[Debug|Profile|Release]/bin.

iOS/tvOS/visionOS

  • Confirm that the version of the iOS/tvOS/visionOS SDK installed on your machine matches the one mentioned in Platform Requirements .
  • Open the Xcode project found in samples/IntegrationDemo/iOS, samples/IntegrationDemo/tvOS or samples/IntegrationDemo/visionOS and build using the desired configuration.

Android

  • Confirm the versions of the SDK and tools for Android on your machine match the ones mentioned in Platform Requirements.
  • Open the Wwise project in samples\IntegrationDemo\WwiseProject and generate the SoundBanks for Android in their default paths.
  • To rebuild the Integration Demo (note that it is pre-built in the SDK):
    • Make sure that your ANDROID_NDK_HOME environment variable points to a valid Android NDK r17c.
    • Open a command prompt.
    • Change directory to samples\IntegrationDemo\Android.
    • Type Build.cmd [armeabi-v7a|x86|arm64-v8a|x86_64] [Debug|Profile|Release].
  • To install on a connected device:
    • Open a command prompt.
    • Change directory to samples\IntegrationDemo\Android\Android_[armeabi-v7a|arm64-v8a|x86|x86_x64]\[Debug|Profile|Release]\bin. For example: samples\IntegrationDemo\Android\Android_armeabi-v7a\Debug\bin.
    • Type adb install IntegrationDemo.apk.

Alternative build method with Android Studio If you have Android Studio installed, we provide a gradle project that will compile and deploy the Integration Demo. Simply open the samples\IntegrationDemo\Android directory in Android Studio and you should be able to build and launch the app.

Note: You will need to use the software keyboard or hardware keyboard to interact with the Integration Demo. Navigation is achieved using the W, A, S, and D keys. Use Enter to select and Space to return.

OpenHarmony

  • Confirm the versions of the SDK and tools for Android on your machine match the ones mentioned in Platform Requirements.
  • Open the Wwise project in samples\IntegrationDemo\WwiseProject and generate the SoundBanks for OpenHarmony in their default paths.
  • To recompile the C++ code and produce a new libIntegrationDemo.so shared library (note that it is pre-built in the SDK):
    • Make sure you have set the OPENHARMONY_NATIVE_SDK environment variable to point to the location of the OpenHarmony native SDK.
    • Open a command-line prompt and navigate to SDK\samples\IntegrationDemo\OpenHarmony.
    • Type Build_Native.cmd [armeabi-v7a|arm64-v8a|x86_64] [Debug|Profile|Release].
  • To re-build the final Integration Demo app bundle (.hap):
    • Open SDK\samples\IntegrationDemo\OpenHarmony in DevEco Studio IDE.
    • Empty out the "signingConfigs" key in SDK\samples\IntegrationDemo\OpenHarmony\build-profile.json5
    • Using DevEco Studio, re-configure the signing process using your own certificate and provisioning profile. Consult the DevEco Studio documentation on signing applications for more details.
    • In the Product selection panel, choose the following:
      • Product: default
      • Build Mode: debug
      • Target Select: choose the appropriate build configuration, such as arm64-v8a_Debug. Choosing "default" here will not work.
    • Once this is done, DevEco Studio is properly configured to build and deploy IntegrationDemo to a connected device.

Linux

  • Confirm that the versions of the SDK and tools for Linux on your Linux machine match the ones mentioned in Platform Requirements.
  • The following packages are required:
    • make
    • clang
    • libsdl2-dev
  • Using the command-line, navigate to the IntegrationDemo Linux directory: cd SDK/samples/IntegrationDemo/Linux
  • Build using the Makefile named IntegrationDemo_Linux.make and the variables documented in Linux-Specific Information.
    • For example, to build a 64-bit binary in the Debug configuration: make -f ./IntegrationDemo_Linux.make AK_LINUX_ARCH=x64 config=debug
  • To run the Integration Demo, simply launch the executable found in the directory SDK/Linux_x[32|64]/[Debug|Profile|Release]/bin.

Usage Instructions

You can navigate through the Integration Demo on Windows using either the keyboard, a connected controller, or any DirectInput compatible device.

  • To navigate between controls on a page, use the up and down arrow keys or the up and down buttons on a gamepad's directional pad.
  • To activate the selected control, hit the Enter key or the A/X button on a gamepad.
  • To go back a page in the menu, hit the Escape key or the B/O button on a gamepad.

Certain controls (such as Toggle Controls and Numeric Sliders) allow you to change values. To change their values, hit the left and right arrow keys or the left and right buttons on a gamepad's directional pad.

Tip: The application has an online help feature! To access the Help page, press F1 on the keyboard or the START button on a gamepad.

The Demos

The code behind each demonstration can be found in the samples\IntegrationDemo\DemoPages directory. For example, the code for the Localization demo will be in the DemoLocalization.h and DemoLocalization.cpp files in that directory.

Tip: Pertinent information about each demo can also be found in the Integration Demo application's online help.

Localization

This demo shows how to implement localized audio. Localized sound objects are found in language-specific SoundBanks in subdirectories in the SoundBank generation directory. We achieve the localization effect by unloading the current SoundBank and reloading the desired language-specific SoundBank.

Use the Language toggle control to switch the current language. Then press the Say Hello button to hear a greeting in the selected language.

For more information about languages and localization, see Integration Details - Languages and Voices.

Dynamic Dialogue

The Dynamic Dialogue demo runs through a series of tests that use Wwise's Dynamic Dialogue features. Each of these tests demonstrates a different control flow so that you can hear the effect it produces:

  • Test 1: Shows how to play a simple dynamic sequence using Wwise IDs.
  • Test 2: Like test 1, but uses strings instead of IDs.
  • Test 3: Shows how to add an item to a dynamic playlist during playback.
  • Test 4: Shows how to insert an item into the dynamic playlist during playback.
  • Test 5: Shows what happens when an item is added to an empty playlist.
  • Test 6: Shows how to use the Stop call on a dynamic sequence.
  • Test 7: Shows how to use the Break call on a dynamic sequence.
  • Test 8: Shows how to use the Pause and Resume calls on a dynamic sequence.
  • Test 9: Shows how to use the Delay call when enqueuing an item to a dynamic sequence.
  • Test 10: Shows how to clear a playlist during playback.
  • Test 11: Shows what happens when the playlist is stopped and cleared.
  • Test 12: Shows what happens when Break is called on a playlist and it clears.
  • Test 13: Shows what happens when a playlist is paused and cleared.
  • Test 14: Shows how to use a callback function with custom parameters when working with Dynamic Dialogue.
  • Test 15: Shows how to use a callback to perform tasks (in this case, to cancel playback after three items have played).
  • Test 16: Shows how to use a callback to perform tasks (in this case, to play a second sequence after the first sequence ends).
  • Test 17: Show how to use Wwise Events in conjunction with Dynamic Dialogue.

For more information about Dynamic Dialogue, see Integration Details - Dynamic Dialogue

RTPC (Car Engine)

This demo shows how to use RTPCs. The RPM numeric slider is linked with an RTPC value (RPM) associated with the engine. Press the Start Engine button to start/stop car engine audio. Use the RPM slider to change the RTPC value and hear the effect.

For more information about RTPCs, see Integration Details - RTPCs.

Footsteps

This demo shows various ways to implement footsteps in a game. It also shows surface-driven bank management to minimize both media and metadata memory when a surface isn't in use. Finally, this demo also shows a very simple case of environmental effects.

In this example, the footstep sounds are modified by two variables: walking speed, and walker weight.

  • Walking Speed issues (Footstep_Speed RTPC) This project supports a smooth transition from walking to running in almost all cases. For this variable, we assume the following: the faster you walk, the shorter the footstep and the harder you hit the ground. This translates in Pitch and Volume changes respectively. Look for RTPC on these parameters in the project. The Speed RTPC is driven directly by the joystick displacement in this demo.
  • Walker Weight issues (Footstep_Weight RTPC) The footstep structure supports various walker weights. We assume that in real life a heavier walker will have a longer footstep and that it will be more muffled. This translates in Pitch and LPF changes respectively. Look for the RTPC on these parameters in the project.

With each surface, we show a different way of dealing with the sound samples and variables. These are only suggestions and ideas that you can use in your own structure.

  • Gravel Our gravel samples are very similar, so it won't give us anything more to have a lot of samples of this surface. More variation is obtained with a bit of Volume, LPF, and Pitch randomization. The Weight influence is done through the EQ effect with its gain parameters driven by the Weight RTPC. For light footsteps, the higher frequencies are boosted, and it's the reverse for heavy footsteps. Note the RTPC's effect on Pitch and Volume.
  • Wood For the wood surface, the walking and running samples were very different, as were the heavy and light footsteps. So, this was organized in a more traditional Switch hierarchy. Both Switch Containers are driven by an RTPC-driven Switch (look in the GameSync tab for Footstep_Gait and Footstep_Weight).
  • Dirt Samples for walking and running on this surface were somewhat similar, so we decided to do the transition with a Blend Container. RTPCs on Pitch and Volume were used to take the Weight into account.

Bank management In the Footsteps demo, the banks were divided into four media banks (one per surface). We divided the screen in four with a buffer zone between each surface where both banks are loaded. This is to avoid a gap in the footsteps due to bank loading. In the SoundBank Manager, look at the GameSync tab. Note that each surface bank includes only the corresponding surface Switch. This will include only the hierarchy related to that Switch in the bank - nothing else. In a large game, this setup has the advantage of limiting the amount of unused samples in a particular scenario, thus limiting the memory used. For level or section-based games, it is easy to identify the surfaces used as they are known from the design stage. For open games, this is trickier and depends a lot on the organization of your game; but, it can still be achieved. For example, it is useless to keep the "snow and ice" surface sounds in memory if your player is currently in a warm city and won't be moving toward colder settings for a long time.

Subtitles/Markers

This demo shows how you can set up a callback function to receive notification when markers inside a sound file are hit. For this demonstration, we are using the markers to synchronize subtitles with the audio track.

For more information on markers, see Integrating Markers.

Music Callbacks

Music sync callback demo

This demo shows how to use music callbacks in general. Beat and bar notifications are generated from music tempo and time signature information.

Music playlist callback demo

This example shows how to force a random playlist to select its next item sequentially. The playlist item may be stopped via the callback as well.

MIDI callback demo

Shows MIDI messages the game can receive using callbacks. MIDI messages include the MIDI notes, CC values, Pitch Bend, After Touch, and Program Changes.

For more information on music callbacks, refer to Integration Details - Music Callbacks.

Interactive Music

This example uses a Music Switch Container. Try switching the States by triggering the Event listed in the demo page. Switching States might produce a result that is immediate or occurs at the time specified in the rules of the Music Container.

MIDI API

This example demonstrates the use of the MIDI API. Press the Start Metronome button to simulate an active metronome. Then select the BPM slider and press LEFT or RIGHT to change its value. The demo uses a registered callback function to post MIDI Events to the sound engine via the PostMIDIOnEvent function.

Motion

This is a multiplayer demonstration which shows how to integrate Wwise's motion engine into your game.

In this demonstration, each player has the option to either close a door in the environment or to shoot a gun that they are holding. A listener is set for each player which is active on the door game object as well as the player's own gun. This way, if any player closes the door in the environment, all players receive force feedback reactions. However, only the players who fired their weapon receive force feedback for that Event. Additionally, on PS4 and PS5, the gun sound will only play on the gamepad speaker of each player.

Note: On Windows, a player using a keyboard should plug in a gamepad to participate in this demo.

This code demonstrates the use of secondary outputs, Wwise Motion, and Listener/Emitter management.

See also

Microphone/AudioInput

This demo shows how to record audio from a microphone and input it in the Wwise sound engine. In the Integration Demo, select the Microphone Demo and speak into the microphone to hear your voice played back by the Wwise sound engine. Toggle the Enable Delay to hear an example of how audio data fed to the Audio Input plug-in can be processed like any other sound created in Wwise.

Each platform has a very different core API to access the microphone. Check the SoundInput and SoundInputMgr classes in the Integration Demo code to see how they interact with the AudioInput plug-in.

Note: This demo is available on the following platforms: Windows, UWP, macOS, iOS, and tvOS.
See also

Positioning

These demos show various ways to do 3D positioning in Wwise.

A helicopter sound starts playing as soon as you enter the page. Move the 'o' around in X and Z, the plane of the screen, using the following keys:

  • Right Stick
  • Arrow Keys/Dpad And hear the sound move along with it. Coordinates are displayed at the bottom-left of the screen.

Position Demo

This demo sets only a single position.

Multi-Position Demo

This demo sets two positions.

Spatial Audio - Portals

This demo shows the effect of Portals in spatial audio positioning. With two Rooms with portals and a movable emitter and listener, the sound propagation path(s) are displayed along with the resulting diffraction amounts in the lower left corner. In addition to portal-driven propagation, a native game-side obstruction algorithm is used for same-room obstruction (emitter-listener and portals-listener). Finally, this demo shows how to use a Room to play multi-channel ambient sounds / room tones that contract and become point-sources at portals.

See also

Spatial Audio - Geometry

This demo showcases the Wwise Spatial Audio Geometry API, usable for direct (dry) path diffraction, and for use with the Reflect plug-in (although Reflect is not used in the demo). With two walls and a movable emitter and listener, the diffraction path(s) are displayed along with the resulting diffraction amounts in the lower left corner. Spatial Audio is set up so that diffraction controls both project-wide obstruction and the Diffraction built-in parameter, although only the former is used in the project.

See also

Clustering/3D Submix

This demos shows positioning applied only in the bus hierarchy. With Position + Orientation 3D Spatialization and Attenuation applied to the bus alone, the sound engine only applies the spatialization after the 3 child sounds are mixed together.

3D Portal and Standard Room

This demo illustrates how a movable emitter and listener can interact with each other. Notably, a Room with a Portal shows:

  • how an aux bus simulates a room that the listener is currently inside;
  • how a 3D-bus chain, 'Room1' -> 'Wet_Path_3D', simulates a room that the listener is not inside.

The 3D bus applies a reverb Effect, after which the output is positioned and spatialized before being mixed in the Master Audio Bus.

2X 3D Portal

This demo allows the experience of a movable emitter and listener interacting with each other in combination with two different "Portaled" Rooms. Depending on the positions of the game objects, the Rooms may be close enough to be excited by the emitter output.

The 3D bus applies a reverb Effect, after which the output is positioned and spatialized before being mixed in the Master Audio Bus.

External Sources

This demo shows how to use external sources. Both buttons play the same sound structure but set up at run-time with either sources "1", "2" and "3", or sources "4", "5" and "6".

See also

Additionally, the external sources are packaged in the File Packager and loaded when opening the demo page. Refer to the Wwise Help for more information on the File Packager, and to the Streaming / Stream Manager chapter for more details on the run-time aspect of file packages.

Background Music Demo

This example shows how to handle the DVR legal requirements for Xbox One and PS4. Since many games include copyrighted music, it is often not permitted to record it with the built-in DVR. This demo shows the differences between a sound that is recorded by the DVR and one that isn't. Please refer to the Wwise Project and check the setup of the sounds in the BGMDemo folder, paying attention to their routing and which Audio Device they use. The Non-Recordable sound will be routed to a bus that outputs to the DVR_Bypass output.

See also

Options Page

This page allows viewing of several initialization settings for the Sound Engine. You can also choose the audio output for the whole application. The sample code shows how to initialize & terminate the Sound Engine and also how to select different physical audio outputs. Please refer to the specific sections below for more details on the Sound Engine initialization.

See also

More Sample Code

The Integration Demo as well as its Wwise Project are kept very simple in order to demonstrate the basics of sound engine integration. For a more realistic integration project, refer to the AkCube Sound Engine Integration Sample Project.


Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise