Export (0) Print
Expand All

Adding a Sound File (XACT)

Demonstrates how to add .wav files to a Microsoft Cross-Platform Audio Creation Tool (XACT) project that can be built and interpreted by an XNA Game Studio game to play audio.

For detailed information about how to author audio using the XACT tool, including information about categories, variables, and other advanced features, see XACT Audio Authoring.

Adding a Sound File

To create a wave bank

  1. Click Start, point to All Programs, click Tools, and then click Microsoft Cross-Platform Audio Creation Tool (XACT).

    Next you'll create a project.

  2. On the File menu, click New Project.

    You are asked for a location and a name for your project.

  3. Enter a name and a location that is easy for you to remember, and then click OK.

    The project is created, and a screen similar to the following appears.

    Dd940199.xact_tutorial_1a(en-us,XNAGameStudio.41).png

    In the empty project, create a wave bank.

  4. Click Wave Banks, and then click New Wave Bank.

    A new wave bank appears in the tree view under Wave Banks with the default name "Wave Bank."

  5. Press ENTER to accept the default name.

To create a sound bank

  1. Click Sound Banks, and then click New Sound Bank.

    A new sound bank appears in the tree view under Sound Banks with the default name "Sound Bank."

  2. Press ENTER to accept the default name.

    At this point, two new windows appear: one for the wave bank and one for the sound bank. These windows can be arranged for easier viewing

  3. Click Window, and then click Tile Horizontally.

    The windows should look similar to the following:

    Dd940199.xact_tutorial_4a(en-us,XNAGameStudio.41).png

To add wave files to the wave bank window

Now you need to add your wave file to the wave bank window.

  1. Click on the Wave Bank window to ensure that it is active.

  2. Click the Wave Banks menu, and then select Insert Wave File(s).

  3. Insert one or more wave files into the wave bank.

    Successfully added files appear in the wave bank window.

    Dd940199.xact_tutorial_2a(en-us,XNAGameStudio.41).png

    Now you need to perform the following step for each wave listed in the wave bank window.

  4. Drag the wave from the wave bank window to the sound bank window, and then drop the wave on top of the Cue Name panel.

    XACT automatically creates a new cue that is linked to a new sound that plays this wave file, as illustrated in this screen.

    Dd940199.xact_tutorial_3a(en-us,XNAGameStudio.41).png
  5. If the lower-left corner of the sound bank window does not have any entries, add entries to it by dragging each sound from the upper-left panel to the lower-left panel of the sound bank.

    This action creates cues that correspond to the sounds.

  6. Click File, and then click Save Project.

You are now ready to load and play sounds from this project in your game; see Playing Sounds from an XACT Project for more information.

Community Additions

ADD
Show:
© 2014 Microsoft