Version

menu_open

Defining Steps to be Performed Pre/Post SoundBank Generation

Depending on your workflow, you may have a certain step or task that needs to be performed immediately before or immediately following the generation of your SoundBanks. For example, you may want to check out specific SoundBank files from your source control system before generating them or you may want the streamed files to be copied to the SoundBanks directory immediately following generation.

In Wwise, these types of tasks are defined by creating command lines. A special command line editor exists within Wwise making it easy for you to build as many command lines as you need. To simplify the process even further, the editor contains a list of all the Wwise-specific and other Windows environmental variables that can be used in a command line.

The specific Wwise variables available for writing custom command lines are as follows:

Command Line Variable

Description

$(AllowExceedMaximum)

Specifies whether SoundBanks can be generated even if they exceed the maximum size specified.

This variable is set to true when the Allow SoundBanks to exceed maximum size option is selected.

$(ContentFileFormat)

Specifies the file type for generated SoundBank content files. Possible values are:

  • ANSI

  • Unicode

$(GenerateContentFile)

Specifies whether files that list the contents of each SoundBank are created. The content files include information on Events, Busses, States, and Switches, as well as a complete list of streamed and in-memory audio files.

This variable is set to true when the Generate SoundBank content files option is selected.

$(GenerateHeaderFile)

Specifies whether a header file is generated that maps Event, State, Switch, and Game Parameter names to IDs.

This variable is set to true when the Generate header file option is enabled.

$(GenerateMaxAttenuationInfo)

Specifies whether the maximum attenuation information is generated for Events.

This variable is set to true when the Metadata Options: Max attenuation option is enabled.

$(GenerateEstimatedDuration)

Specifies whether the estimated maximum and minimum duration and duration type information is generated for events.

This variable is set to true when the Metadata Options: Estimated Duration option is enabled.

$(HeaderFileFullFilePath)

The full path of the header file, which is: $(HeaderFilePath)\Wwise_IDs.h

$(HeaderFilePath)

The path or location where the header file will be saved.

This path is taken from the Header file path text box.

$(InfoFilePath)

The full file name of the current platform's Info file.

$(IsRunningFromCmdLine)

Specifies whether Wwise was launched from the command line with the -generatesoundbanks flag.

$(LanguageList)

The list of languages passed to the command line or the selected languages in the SoundBank Manager.

[Note] Note

The list is a space-separated list.

$(Platform)

The name of the current platform.

$(SoundBankList)

The list of SoundBanks passed to the command line or the selected SoundBanks in the SoundBank Manager.

[Note] Note

The list is a space-separated list. Use double-quotes to enclose the list in one single argument.

$(SoundBankPath)

The path or location where the current platform's SoundBanks are saved.

$(UseSoundBankNames)

Specifies whether SoundBank names (true) or IDs (false) are used to name generated SoundBank (BNK) files, as well as within SoundBanks to refer to media in other banks.

This variable is set to true when the Use SoundBank names option is enabled.

$(WwiseExeDriveLetter)

The drive letter on your workstation where the Wwise executable (Wwise.exe) is located.

$(WwiseExePath)

The path or location of the Wwise executable (Wwise.exe).

$(WwiseExeProcessID)

The numerical Process Identifier of the Wwise executable (Wwise.exe).

$(WwiseProjectDriveLetter)

The drive letter on your workstation where the Wwise project is located.

$(WwiseProjectName)

The name of the current project.

$(WwiseProjectPath)

The path or location of the Wwise project.

$(WaapiWampPort)

The port used by WAAPI for the WAMP protocol.

$(WaapiHttpPort)

The port used by WAAPI for the HTTP protocol.

[Note] Note

Additionally, all environment variables, such as $(WWISESDK), are available.

To be as flexible as possible, Wwise allows to define different command lines for the following types of steps:

  • Global opening step - A command line that applies to all platforms and is performed before any other step.

  • Platform-specific pre-generation step - A command line that applies to a specific platform and is performed before the SoundBanks are generated.

  • Platform-specific post-generation step - A command line that applies to a specific platform and is performed after the SoundBanks are generated.

  • Global closing step - A command line that applies to all platforms and is performed after all other steps.

By default, every project includes a platform-specific post-generation step command line that copies the streamed files to the SoundBank directory. You can, however, automate any type of task by executing a different command line. Wwise also ships with another Factory command line that uses the File Packager to generate a package containing all data and media within your SoundBanks. For more information about the File Packager, refer to Chapter 36, Managing File Packages. For more information about loading factory command lines, refer to Loading Factory/Custom Command Lines.

You can also save the command lines you create to a file (WCMDLINE) so that you can use them later on, within the same project, across projects, or if you want to share them with other users. For more information on saving commands, refer to Saving Custom Command Lines to a File.

To define tasks to be performed before SoundBank generation:

  1. Open the Project Settings dialog box by doing one of the following:

    • From the Project menu, select Project Settings.

    • Press Shift+K.

  2. Switch to the SoundBanks tab.

  3. To create a global Pre-Generation Step, click the browse button […] to open the Global Opening Step Editor.

    The Pre-Generation Step Editor opens.

  4. In the Description text box, type a name that clearly describes the step or task that will be performed.

  5. Click in the Commands text box to begin creating your command line.

    [Note] Note

    The Commands text box works like most other text editors, which means you can add new lines of text by pressing Enter, delete text by selecting it and pressing Delete, and so on.

  6. If you want to insert built-in macros and environment variables in your command, do the following:

    In the Macros group box, select one of the following options:

    • Built-in Macros - To display a list of ­Wwise-specific variables that can be used within the Wwise command lines.

    • Environment Variables - To display a list of Windows-specific environment variables that can be used within the Wwise command lines.

    To add a variable to the command line, do one of the following:

    • Double-click a variable in list.

    • Select a variable from the list and then click Insert.

    Continue to add variables to your command line, as required.

  7. If you need to perform a second global pre-generation step, simply go to the end of the first line, press Enter, and then start creating a new command line.

  8. Click OK to save the command line and to close the Pre-Generation Step Editor.

    [Note] Note

    If you want to save the command line to file, click the Save As button in the editor. For more information on saving custom command lines, refer to Saving Custom Command Lines to a File.

  9. To create a platform-specific pre-generation step, repeat steps 3-8 for each platform.

    [Note] Note

    You can load factory and previously saved custom command lines into the editor by clicking the Load button. For more information on loading factory/custom commands, refer to Loading Factory/Custom Command Lines.

To define tasks to be performed after SoundBank generation:

  1. Open the Project Settings dialog box by doing one of the following:

    • From the Project menu, select Project Settings.

    • Press Shift+K.

  2. Switch to the SoundBanks tab.

  3. In the Post-Generation Step group box, you will notice that the Copy Streamed Files command line is added by default. To modify this command line or to add an additional one, click one of the browse buttons [...].

    The Post-Generation Step Editor opens.

  4. In the Description text box, type a name that clearly describes the step(s) or task(s) that will be performed.

  5. In the Commands text box, click at the end of the current command line and press Enter. You can now begin to create a new command line.

    [Note] Note

    The Commands text box works like most other text editors, which means you can add new lines of text by pressing Enter, delete text by selecting it and pressing Delete, and so on.

  6. If you want to insert built-in macros and environment variables in your command, do the following:

    In the Macros group box, select one of the following options:

    • Built-in Macros - To display a list of ­Wwise-specific variables that can be used within the Wwise command lines.

    • Environment Variables - To display a list of Windows-specific environment variables that can be used within the Wwise command lines.

    To add a variable to the command line, do one of the following:

    • Double-click a variable in list.

    • Select a variable from the list and then click Insert.

    Continue to add variables to your command line, as required.

  7. If you need to perform an additional pre-generation step, simply go to the end of the first line, press Enter, and then start creating a new command line.

  8. Click OK to save the command line and to close the Post-Generation Step Editor.

    [Note] Note

    If you want to save the command line to file, click the Save As button in the editor. For more information on saving custom command lines, refer to Saving Custom Command Lines to a File.

  9. Repeat steps 3-8 for the global closing step and/or for each additional platform.

    [Note] Note

    You can load factory and previously saved custom command lines into the editor by clicking the Load button. For more information on loading factory/custom commands, refer to Loading Factory/Custom Command Lines.


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