Version
menu_open

Defining Custom User 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. Although this information is usually defined at the project level, there may be circumstances where you will want to override it to create your own custom settings.

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.

[Note] Note

The build process may be interrupted if an external tool returns an error or cannot be found. This is accomplished by setting the corresponding log severity level to Fatal Error in the log settings. For more information, refer to Changing the Severity of Messages in the Log.
When a custom Global opening step fails, the entire build process is interrupted and no SoundBanks are created. On the other hand, when the failure occurs on a custom step for a specific platform, only that platform is skipped. However, the Global closing step will be skipped since part of the process wasn't successful. To be considered failing, an external process has to return a value other than zero.

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 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 selected.

$(GenerateMaxAttenuationInfo)

Specifies whether the maximum attenuation information is generated for Events.

This variable is set to true when the Metadata Options: Max attenuationoption is selected.

$(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 selected.

$(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 SoundBanks.

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

$(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

Environment variables are automatically mapped, for example, $(WWISESDK).

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 user tasks to be performed pre-SoundBank generation:

  1. In the SoundBank Manager, click User Settings.

    The SoundBank User Settings dialog box opens.

  2. Select the Override Project Pre-Generation Step option.

  3. To add to or modify the Global opening pre-generation step that is defined in the Project Settings dialog box, click the corresponding Edit button (...).

    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. In the Commands text box, write a new command line or edit the existing command line, as required.

    [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 want to add another 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 add or modify the existing platform-specific pre-generation steps, repeat steps 3-8 for each platform.

    [Note] Note

    You can also 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 user tasks to be performed post SoundBank generation:

  1. In the SoundBank Manager, click User Settings.

    The SoundBank User Settings dialog box opens.

  2. Select the Override Project Post-Generation Step option.

  3. To add or modify the existing post-generation step that is defined in the Project Settings dialog box, click one of the Edit 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, write a new command line or edit the current command line, as required.

    [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 want to add another 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 also 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