CREATING THE SOUND.XML

In this section we'll look at creating the basic sound.xml file that will be used by aircraft to link the sounds available in the sound package (created using Wwise, as explained here: Setting Up Wwise). We'll be taking you through the steps required to create the file from scratch and have it link with a single sound to be played in the simulation. The process outlined will generally be the same for all of the simple sounds required by an aircraft, and this is designed to give you a starting point for adding further sounds afterwards. We also have a more complex tutorial that covers how to create the audio required for engine sound effects, which you can find here:

 

Note that we won't be going into too much depth about any of the XML elements used in this tutorial, as those are all covered in full on the following page of the main documentation:

 

 

Create The sound.xml File

The first thing you'll need to do is go to the aircraft project that you're working on and open the sound folder in the main project directory (or create this folder if it doesn't exist, although if you've followed the Setting Up Wwise tutorial then the folder should exist already with the audio package in it). The folder should be found here:

<ROOT>\[MyCompany_MyAircraft]\PackageSources\SimObjects\Airplanes\[MyCompany_MyAircraft]\

In this folder you then want to create a new XML file called sound.xml (right click, select New > Text Document, and save as sound.xml):

Creating The Sound.xml File In The Correct Location

 

 

Edit The sound.xml File

With the file created, you can now open it in your editor of choice and add in the following lines:

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
</SoundInfo>

These lines are required for the sound.xml file to be functional, and will be required every time you need to create this file.

 

Once you have that base written, you can then add the <WwisePackages> container element, where you will specify your <MainPackage> (and - if needed - an <AdditionalPackage>):

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
    <WwisePackages>
        <MainPackage Name="MyCompany_MyAircraft">
    </WwisePackages>
</SoundInfo>

Note that the package name is given without the PC.PCK extension.

 

The final step in this procedure is to add in a <Sound> element that defines the sound you want to use, which in this case is the stall warning sound effect we created previously:

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
    <WwisePackages>
        <MainPackage Name="MyCompany_MyAircraft">
    </WwisePackages>
    <MiscellaneousSound>
        <Sound WwiseEvent="STALL_WARNING" WwiseData="true" />
    </MiscellaneousSound>
</SoundInfo>

Some things to note here:

  • Wwise event names are NOT case sensitive, however we use upper case here to show that the event name is linked to the corresponding simulation event (more on this below).
  • We have placed this sound in the miscellaneous sounds category. Sounds in this category rely on hard-coded event names - in this case the "STALL_WARNING" event (hence the use of upper case). It's for this reason that the Setting Up Wwise section tells you to use a very precise naming convention for the sound event unit. You can find a full list of available hard-coded events here: <MiscellaneousSounds>.

 

 

Testing The Package

At this point, you have done everything required to test the package and ensure that the sound plays correctly. For that simply open the project in DevMode, build it, and then you can verify that the sounds have been included in the package by going to the package location after building, which should look like this:

Placing The PC.PCK File With The Sound.xml

 

Once you have verified that, you can start a free flight anywhere in the world using the aircraft you're working on. When in flight, simply cause a stall situation and you should hear the stall warning be played.

Stalling The Aircraft To Hear The Warning