This crate is essentially a build script that generates a file of constants. This crate is meant to be used along the rrise crate.
Once soundbanks are generated by Wwise, you will usually find a companion .txt file containing the soundbank definition: all the events, states, RTPCs, switches, triggers etc by name and by ID.
Rrise-Headers will parse this definition file and generate a rust file replicating it with constants usable in code.
This will allow you to fail early when your Wwise project gets updated. For instance, if some events are going missing, your code won't compile without fixing those stale events it still posts.
The following environment variables are available:
Variable | Description |
---|---|
BANK_PATH |
Your generated soundbank folder |
- Set the
BANK_PATH
environment variable to your generated soundbank folder. Don't include the platform folder, but rather just the folder that will contain the per-platform directories of your soundbanks. - Make sure the soundbank paths in your Wwise project settings end with
Linux
andWindows
. If they don't, this crate will expect the soundbanks to be directly inBANK_PATH
. - Add this crate as a dependency of your project.
- Add
use rrise_headers::rr
to the files where you need to refer to Wwise generated resources like events or RTPCs. - You can now use constants like
rr::ev::MyEvent
and benefit from your IDE's autocompletion when you typerr::
.
When translating Wwise identifiers,
- The case of the resulting Rust identifiers is identical to the one in the Wwise project.
- Spaces and other invalid characters are replaced with
_
. - Would an identifier start with a number, it is prepended with
_
. - Unicode characters are allowed.
Here is how rrise-headers structures your Wwise resources in the rr
module:
rr
|-- bnk // Init + your soundbanks defined as string constants
|-- ev // Events
|-- d_ev // Dialog events
|-- rtpc // Game parameters
|-- trg // Triggers
|-- bus // Busses
|-- xbus // Auxiliary busses
|-- dev // Audio Devices
|
|-- st // States
|---- <... YourStateGroup ...> // State group ID *and* module
|------ <... states available in YourStateGroup ...> // State values are namespaced in their group
|
|-- sw // Switches
|---- <... YourSwitchGroup ...> // Switch group ID *and* module
|------ <... switches available in YourSwitchGroup ...> // Switch values are namespaced in their group
Wwise and the Wwise logo are trademarks of Audiokinetic Inc., registered in the U.S. and other countries.
This project is in no way affiliated to Audiokinetic.