Blog homepage

How to play sounds from Wwise in Unreal Engine

Wwise Tips & Tools

Wwise has many features; but at the start of development when you might not have enough information on how to use it, it may not work as you expect it to. I don't want you to feel that Wwise is difficult to use simply because of an initial hiccup, so allow me to lead you through a process that will work without fail, as long as you follow the steps described here.

In this first blog, I'll go as far as playing sounds with Unreal Engine.

The versions I used to check that this process works:

  • Wwise 2023.1.1.8417
  • Unreal Engine 5.3.2

Note that if you are using any other version, the behavior may be different.

 

Table of contents

Create a project
    Create an Unreal Project
    Integrate the Unreal Integration
    Wwise initial setup
    Unreal initial setup
Registering sounds in Wwise Project
Creating UAssets
Playing sounds from Blueprint
Final thoughts
Appendix - Sample folder configuration
    Putting everything inside the Unreal project
    Placing the Wwise project outside the Unreal project
Appendix - How to create UAssets
Appendix – Quick ways to play sounds
    Play sounds using AkAmbientSound
    Play sounds using BluePrint
    Play sounds using C++

 

Create a project

Create an Unreal project

1. Open Unreal Engine and select "GAMES – Third Person".
2. Specify the project name.
  • In my example, I named the project "ThirdPerson_Tutorial".
3. Click the Create button to create a new project.
4. After you create the project, the Unreal Engine editor view will open, but let's close it for now.

01_Unreal_Create_Project

 

Integrate the Unreal Integration

1. Open the Audiokinetic Launcher, and open the Unreal tab.
2. Click the "Integrate Wwise in Project…" button of the "ThirdPerson_Tutorial" project you just created.

02_Integrate_Wwise

3. Make sure of the platform you are going to integrate.
4. If you don't specify a Wwise project path, a Wwise Project will be created automatically under the Unreal Project.
  • If you have already created a Wwise project somewhere, specify it here to use it.
5. Click the Integrate button.

03_Integrate_Wwise_Menu

6. The integration is now complete.
7. Next, in order to update your Wwise Project, click Open in Wwise - Wwise 2023.1.1.8417.

04_Open_in_Wwise

 

Wwise initial setup

1. Go to Project – Project Settings – SoundBanks, and check "Enable Auto Defined SoundBanks".
2. Save the Wwise Project, and re-open Unreal Engine.

05_Wwise_Initial_Settings

 

Unreal initial setup

1. Open Edit – Project Settings….
2. Go to Wwise – User Settings – WAAPI, and enable "Auto Connect to WAAPI".

06_Unreal_Initial_Settings_1

3. Go to Wwise – Integration Settings – Installation – Root Output Path, and specify your Wwise Project's "GeneratedSoundBanks" folder.
  • If you leave this field blank, it will reference the Content folder and will not be able to play the sounds correctly.

07_Unreal_Initial_Settings_2

4. When you open Unreal Engine, the Wwise Authoring Tool will display the "External Project Changes" warning dialog, so click the Reload button.

08_Unreal_Initial_Settings_3

5. There will be a warning in the Wwise Browser telling you that SoundBank metadata was not found, but don't worry, and just click the "Generate SoundBanks…" button.

09_Unreal_Initial_Settings_4

6. In the "Generate SoundBanks" dialog box, click the Generate button so that SoundBanks are generated, and the directory configuration is displayed in the Wwise Browser.

10_Unreal_Initial_Settings_5

 

Registering sounds in your Wwise Project

Now let's try playing an ambient sound.
We'll take advantage of a sound in the IntegrationDemo folder:
  •<Wwise>\SDK\samples\IntegrationDemo\WwiseProject\Originals\SFX

1. Drag & drop the waves.wav file from this folder to the Actor-Mixer Hierarchy's Default Work Unit, and the "Audio File Importer" dialog box will open.

11_Register_Assets_1

2. Click the Import button, and it will be registered as a Sound SFX named "waves".

12_Register_Assets_2

3. In the Project Explorer, select the "waves" Sound SFX you just registered to show information regarding the object on the right.

13_Register_Assets_3

4. In the General Settings tab, there is a Loop setting. Enable this.

14_Register_Assets_4

5. Right click the "waves" Sound SFX, and create these Events from the menu:
  •Play_waves: Plays the “waves” Sound SFX
  •Stop_waves: Stops the “waves” Sound SFX

15_Register_Assets_5

6. Once you finish these steps, save the Wwise Project and re-open Unreal Engine.

 

Creating UAssets

In order to play the sound, you need to create an Unreal Engine asset, or a UAsset.
There are several ways to do this, but let me show you how to do it using Reconcile.

1. First, create a SoundBank that includes the added Event.

16_Create_UAssets_1

2. Next, in the Wwise Browser, click the Reconcile button.

17_Create_UAssets_2

3. Check that "UAsset Operation" is set to "Create", and click the "Reconcile Unreal Assets" button.

18_Create_UAssets_3

4. The UAsset is generated. In the Wwise Browser, check the "Wwise UAssets Status" column.

19_Create_UAssets_4

 

Playing sounds from Blueprint

In this article, I will show you how to play sounds from Blueprint.

1. Select "Open Level Blueprint" from the menu.

20_Play_by_BluePrint_1

2. Right-click the Blueprint view to create a BeginPlay event.

21_Play_by_BluePrint_2

3. Drag a connector from the BeginPlay event to create a PostEvent node.

22_Play_by_BluePrint_3

4. In "Ak Event", set Play_waves.

23_Play_by_BluePrint_4

5. Compile.

24_Play_by_BluePrint_5

6. Without changing anything else, click the Play button.

25_Play_by_BluePrint_6

7. Now you should hear the sound of waves!

26_Play_by_BluePrint_7

 

Final thoughts

I have followed the steps in this article myself to make sure they work. However, some of the steps or screenshots may change with future version upgrades, so if you notice any behaviors that are different from what I described here, please let me know in the Comments section.

If there are any other features you would like to read about, please post them in the Comments as well.

 

Appendix - Sample folder configuration

Putting everything inside the Unreal project

You can include the "Generated SoundBanks" folder in the Wwise project, and place the whole Wwise project inside the Unreal project.

27_Wwise_in_Unreal

  • Pro: Everything is complete in one folder/repository.
  • Con: People who are not sound designers also need to download the Wwise project (though they don't need the Wwise authoring tool).

 

Placing the Wwise project outside the Unreal project

You can place the "Generated SoundBanks" folder inside the Unreal project, and place the Wwise project outside the Unreal project.

28_Wwise_outside_Unreal

  • Pro: People who are not sound designers do not need to download the Wwise project.
  • Con: Everything is divided between multiple folders/repositories.
*TIP: In order for this to run on Unreal editor, the minimum required configuration amounts to just the files directly under "Generated SoundBanks", and the Windows folder.

 

Appendix - How to create UAssets

A) In Wwise Browser, drag & drop an Event to the content browser.

29_Create_UAssets_1

B) Right-click, and select "Import Selected Assets" from the menu.
  • You can specify multiple Events or folders.

30_Create_UAssets_2

C) You can also create UAssets by dragging & dropping Events from the Wwise Browser to the actor property, or to the targeted Blueprint component.

31_Create_UAssets_3

32_Create_UAssets_4

D) Only in case of Events, you can drag & drop them from the Wwise Browser to the viewport to generate UAssets at the same time as AkComponents.

33_Create_UAssets_5

When you carry out steps C or D, UAssets will be generated in the location specified in Edit - Project Setting – Wwise – Integration Settings – Asset Creation – Default Asset Creation Path:

34_Create_UAssets_6

 

Appendix – Quick ways to play sounds

Play sounds using AkAmbientSound

1. Place an AkAmbientSound actor.

35_Play_by_AkAmbientSound_1

2. Set the event you want to play on the AkEvent.

36_Play_by_AkAmbientSound_2

3. Enable "Auto Post".

37_Play_by_AkAmbientSound_3

4. Set "Obstruction Occlusion - Refresh Interval" to 0.0.

38_Play_by_AkAmbientSound_4

 

Play sounds using Blueprint

1. Select "Open Level Blueprint".

39_Play_by_BluePrint_1

2. Create a BeginPlay event.

40_Play_by_BluePrint_2

3. Create a Post Event node from BeginPlay.

41_Play_by_BluePrint_3

4. Set the event you want to play on the Post Event's AkEvent.

42_Play_by_BluePrint_4

 

Play sounds using C++

You can post events using the UAkAudioEvent method, defined in AkAudioEvent.h.

1. You can post an Event to the specified Actor/Component/GameObject.

  • AkPlayingID UakAudioEvent::PostOnActor()
  • AkPlayingID UakAudioEvent::PostOnActorAndWait()
  • AkPlayingID UakAudioEvent::PostOnComponent()
  • AkPlayingID UakAudioEvent::PostOnComponentAndWait()
  • AkPlayingID UakAudioEvent::PostOnGameObject()
  • AkPlayingID UakAudioEvent::PostOnGameObjectAndWait()
  • AkPlayingID UakAudioEvent::PostOnGameObjectID()

2. You can use a dummy GameObject.

  • AkPlayingID UakAudioEvent::PostAtLocation ()
  • AkPlayingID UakAudioEvent::PostAmbient()

3. APIs that manage data loading:

  • void UakAudioEvent::LoadData()
  • void UakAudioEvent::UnloadData()
  • bool UakAudioEvent::IsDataFullyLoaded()
  • bool UakAudioEvent::IsLoaded()

Hiroshi Goda

Senior Field Application Engineer

Audiokinetic

Hiroshi Goda

Senior Field Application Engineer

Audiokinetic

Hiroshi is Senior Field Application Engineer and Technical Evangelist at Audiokinetic K.K. (Japan), and provides technical support to customers who have implemented Wwise, or are considering doing so. His career as a game programmer began in 1997 with PlayStation, continuing on until PlayStation3, after which he started working in mobile games. Hiroshi moved on to the cyber security industry in 2016, but returned to gaming in 2021 when he began his current role. With experience in color reduction tools and development of PS1 video standards, he has a patent in layered drawing using 3-value α movies, and he is actually more of a visuals guy rather than audio.

Comments

Leave a Reply

Your email address will not be published.

More articles

Using Wwise in Game Jams and Micro-Projects

Game jams, as fun as they can be, can be stressful and frustrating from an audio point of view....

15.5.2018 - By Yoann Morvan

Wwise 2021.1 | What's New

Wwise 2021.1 is out and available for you to download from the Wwise Launcher. Here's a quick...

11.3.2021 - By Audiokinetic

How Sound Designers Use PureData + Heavy to Develop DSP Plug-ins - Part 3

How to continue using Heavy Compiler in Wwise 2021.1.x?

17.2.2022 - By Chenzhong Hou (侯晨钟)

Wwise 2022.1 Unreal Integration Changes

About Wwise 2022.1 Unreal Integration This version is a major milestone in the Unreal Integration...

9.9.2022 - By Michel Donais

State of the Wwise Unreal Integration

This post is a follow-up to my previous "Improving the Wwise Unreal Integration" published last...

13.10.2023 - By Guillaume Renaud

How to use AudioLink in Unreal Engine

Introduction In this article, we focus on Unreal Engine's AudioLink.The operation has been...

6.8.2024 - By Hiroshi Goda

More articles

Using Wwise in Game Jams and Micro-Projects

Game jams, as fun as they can be, can be stressful and frustrating from an audio point of view....

Wwise 2021.1 | What's New

Wwise 2021.1 is out and available for you to download from the Wwise Launcher. Here's a quick...

How Sound Designers Use PureData + Heavy to Develop DSP Plug-ins - Part 3

How to continue using Heavy Compiler in Wwise 2021.1.x?