Crates.io | rrise |
lib.rs | rrise |
version | 0.2.3 |
source | src |
created_at | 2022-04-01 01:44:17.245766 |
updated_at | 2022-11-17 00:53:47.959088 |
description | A rust binding for Wwise |
homepage | |
repository | https://github.com/dtaralla/rrise |
max_upload_size | |
id | 560012 |
size | 4,564,797 |
Rrise is a Rust binding for Wwise. It is not and does not want to be a complete game engine integration, but rather a starting point for other crates leveraging the binding.
The end goal is to provide game engines written in Rust like Bevy with a safe Wwise API, without having to tinker with the FFI world.
This is planned to become a rather advanced crate, that paves the way for exciting sound engine work in established Rust game engines. That said, I'm definitely not the most proficient in Rust. If you notice some questionable implementation or architectural choices, please reach out to improve the crate. Pull requests are more than welcome: they are encouraged!
In order to use this crate, you should check the system requirements below.
Rrise uses the log crate for all its logging needs. Refer to log
's
docs for how to use it.
Checkout the rrise-headers crate to automatically generate your Wwise project structure as namespaced Rust constants!
You can set the following cfg
flags through the RUSTFLAGS
environment variable before building to chose which
configuration of Wwise you wish to link against:
Flag | AK_OPTIMIZED |
Comms | Description | |
---|---|---|---|---|
Debug | --cfg wwdebug |
✕ | ✔ | Useful to debug with AudioKinetic support folks |
Profile (default) |
--cfg wwprofile (or nothing) |
✕ | ✔ | That's what you should be using during development |
Release | --cfg wwrelease |
✔ | ✕ | Optimized for final retail builds |
If Comms are disabled, it means you can't connect to the running game from Wwise Authoring app.
For more info, check the AudioKinetic docs.
You can choose to either link statically or dynamically to the Wwise plugins.
Note that some plugins like AkMeter, AkVorbisDecoder and AkOpusDecoder can only be statically linked and are not available for dynamic linking.
See this page for a list of plugins supported by Wwise, per platform.
This is the default behavior. Wwise plugins like AkRoomVerb, AkParametricEQ, Motion etc. will be loaded at runtime from their respective shared library as needed.
Any project relying on dynamic linking for some plugins needs to also deploy their respective licensed shared libraries along the final executable (you can do this with a build script for instance).
You can find these shared libraries in $WWISESDK/[platform]/[config]/bin
.
You might want to statically link some Wwise plugins instead of loading them at runtime from a shared libary. In this case, you can leverage Rrise's cargo features to enable static linking of such plugins.
For example, if you want to statically link the AkRoomVerb plugin, just build with the AkRoomVerbFX
feature
enabled. When your project runs, you can check that the static version of the plugin was loaded in the debug log:
AkRoomVerbFX has been statically loaded successfully
Note: If you already built your project once, you need to make Rrise's build script rerun to enable static
linking of your features. You can change the value of the RRISE_RERUN_BUILD
environment variable before building to
force a rerun of Rrise's build script. You can also force a full rebuild with cargo clean & cargo build --features=The,Plugin,List
.
AkInitSettings::with_plugin_dll_path
contains spaces, the DLLs in that folder won't be discoverable by Wwise..../SDK/Linux_x64/Profile/bin/libDefaultConversions.so: cannot open shared object file: No such file or directory
.../SDK/Linux_x64/Profile/bin/libAkSoundEngineDLL.so: cannot open shared object file: No such file or directory
bindgen
crate requirementsMSVC
2
cc
crate)WWISESDK
environment variable is set to the SDK folder of your Wwise installationclang
g++
(for libstdc++
)WWISESDK
environment variable is set to that folderWwise 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.
You still need a licensed version of Wwise installed to compile and run this project. You need a valid Wwise license to distribute any project based on this crate.
WSL2 on Windows 11 is required to run the bevy_music_visualizer
example ↩
Not tested on other compilers like MinGW or Clang ↩
Only Wwise 2021.1.10+ supports VS2022. Trying to compile this crate with VS2022 and a version of Wwise older than 2021.1.10 will fail. ↩
Audiokinetic doesn't provide direct downloads to their SDK: you can only install it through their launcher. However, this launcher being only available on Windows and MacOS, you'll need to install it on a VM or similar before you can work with this crate on Linux. ↩