diff --git a/content/news/2023-03-04-bevy-0.10/index.md b/content/news/2023-03-04-bevy-0.10/index.md index 0fb8cb05a2..2e1d0b753a 100644 --- a/content/news/2023-03-04-bevy-0.10/index.md +++ b/content/news/2023-03-04-bevy-0.10/index.md @@ -23,6 +23,47 @@ Since our last release a few months ago we've added a _ton_ of new features, bug Description here. +## Spatial Audio + +
authors: @mockersf, @DGriffin91, @harudagondi, @alice-i-cecile
+ +The library Bevy uses for audio, [`rodio`], contains support for spatial audio. In this version, we now support spatial audio (with certain caveats, like no HRTF and no first class support for `Emitter` and `Listener` components). + +Interestingly, during the development of this specific feature, `@harudagondi` found a [bug][reverse-channels-bug] where the audio channels reverse when running the app in either debug or release mode. This turns out to be a `rodio` issue, and this also affects previous versions of Bevy. Thanks to `@dis-da-moe`, the bug has been [fixed upstream][rodio-pr]. See the linked PR for interesting details about audio programming quirks and performance issues. + +You can now have spatial audio in your game! Clone the `bevy` repository and invoke `cargo run --example spatial_audio_3d --release` in the command line for a showcase of 3D spatial audio in Bevy. + +[`rodio`]: https://crates.io/crates/rodio +[reverse-channels-bug]: https://github.com/RustAudio/rodio/issues/444 +[rodio-pr]: https://github.com/RustAudio/rodio/pull/455 + +## Custom Audio Sources + +
authors: @dis-da-moe
+ +Bevy supports custom audio sources through the [`Decodable`] trait, but the way to register to the bevy app is very boilerplatey and sparsely documented. In **Bevy 0.10**, a new extension trait for `App` is added and the documentation for [`Decodable`] has vastly improved. + +As such, instead of doing this: + +```rust +struct MyCustomAudioSource { /* ... */ } + +app.add_asset::() + .init_resource::>() + .init_resource::>() + .add_system(play_queued_audio_system::.in_base_set(CoreSet::PostUpdate)) +``` + +You only have to do this: + +```rust +app.add_audio_source::() +``` + +Much cleaner! + +[`Decodable`]: https://docs.rs/bevy_audio/latest/bevy_audio/trait.Decodable.html + ## `Ref` Queries
authors: @Guvante, @JoJoJet