From af488f0a0e362d4266676e7646390c4e2fb19d17 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Fri, 13 Oct 2023 13:43:27 -0700 Subject: [PATCH 1/2] Add spatial audio API ergonomics section --- content/news/2023-10-21-bevy-0.12/index.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/content/news/2023-10-21-bevy-0.12/index.md b/content/news/2023-10-21-bevy-0.12/index.md index 5321faf913..15370ffb02 100644 --- a/content/news/2023-10-21-bevy-0.12/index.md +++ b/content/news/2023-10-21-bevy-0.12/index.md @@ -19,6 +19,24 @@ Since our last release a few months ago we've added a _ton_ of new features, bug
authors: @author
+## Spatial Audio API Ergonomics + +
authors: @rparrett, @hymm, @mockersf
+ +Spatial audio was heroically [put together](https://bevyengine.org/news/bevy-0-10/#spatial-audio) at the last minute for Bevy 0.10, but the implementation was somewhat bare-bones and not very user-friendly. Users needed to write their own systems to update audio sinks with emitter and listener positions. + +Now users can just add a `TransformBundle` to their `AudioBundle`s and Bevy will take care of the rest! + +```rust +commands.spawn(( + TransformBundle::default(), + AudioBundle { + source: asset_server.load("sounds/bonk.ogg"), + settings: PlaybackSettings::DESPAWN.with_spatial(true), + }, +)); +``` + ## What's Next? We have plenty of work that is pretty much finished and is therefore very likely to land in **Bevy 0.13**: From 50b3f5fc44f3273ebd2c4172a8ac652ba9f88350 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Fri, 13 Oct 2023 14:32:41 -0700 Subject: [PATCH 2/2] Clarify that this is still pretty basic --- content/news/2023-10-21-bevy-0.12/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/news/2023-10-21-bevy-0.12/index.md b/content/news/2023-10-21-bevy-0.12/index.md index 15370ffb02..c29b003003 100644 --- a/content/news/2023-10-21-bevy-0.12/index.md +++ b/content/news/2023-10-21-bevy-0.12/index.md @@ -23,7 +23,7 @@ Since our last release a few months ago we've added a _ton_ of new features, bug
authors: @rparrett, @hymm, @mockersf
-Spatial audio was heroically [put together](https://bevyengine.org/news/bevy-0-10/#spatial-audio) at the last minute for Bevy 0.10, but the implementation was somewhat bare-bones and not very user-friendly. Users needed to write their own systems to update audio sinks with emitter and listener positions. +A simple "stereo" (non-HRTF) spatial audio implementation was heroically [put together](https://bevyengine.org/news/bevy-0-10/#spatial-audio) at the last minute for Bevy 0.10, but the implementation was somewhat bare-bones and not very user-friendly. Users needed to write their own systems to update audio sinks with emitter and listener positions. Now users can just add a `TransformBundle` to their `AudioBundle`s and Bevy will take care of the rest!