A bevy integration for the unofficial Steam Audio Rust port, phonon_rs.
Demo: https://youtu.be/DFIYmiytqAw TODO: Update demo with HRTF and transmission.
As phonon_rs is game engine and audio engine independent, a choice must be made for the audio engine. Currently only FMOD is supported (through bevy_fmod specifically). Kira support is possible, pending the following issue.
- Panning Effect (stereo only for now)
- Binaural Effect (built-in HRTF only for now)
- Direct Effect
- Distance attenuation
- Air absorption
- Occlusion
- Transmission (one material per mesh for now)
- Directivity
Planned: Geometry-based reverb (CPU/GPU), baking and more.
- First follow the setup of bevy_fmod.
- Clone https://github.com/GitGhillie/phonon_rs and build the FMOD plugin
using
cargo build -p phonon-fmod --release
. - Place the FMOD plugin into one of the FMOD plugin directories.
- Copy phonon_fmod.plugin.js to the plugin directory. TODO add link.
- In FMOD Studio you can now add the Phonon Spatializer effect to your event tracks:
- On the Bevy side update FmodPlugin to include the path to the FMOD plugin, and add the PhononPlugin:
.add_plugins((
DefaultPlugins,
FmodPlugin {
audio_banks_paths: &[
"./assets/fmod-project/Build/Desktop/Master.bank",
"./assets/fmod-project/Build/Desktop/Master.strings.bank",
"./assets/fmod-project/Build/Desktop/Music.bank",
],
plugin_paths: Some(&["./assets/fmod-project/Plugins/libphonon_fmod.so"]),
},
))
.add_plugins(PhononPlugin::default())
- See https://github.com/Salzian/bevy_fmod/blob/main/examples/spatial.rs for setting up FMOD sources and listeners.
By default, FMOD sources will automatically get a
PhononSource
component for simulation. SeePhononPlugin
documentation if you want to change this.
Licensed under Apache-2.0