Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add first class support for spatial audio in bevy #22

Open
3 tasks
harudagondi opened this issue Aug 27, 2022 · 0 comments
Open
3 tasks

Add first class support for spatial audio in bevy #22

harudagondi opened this issue Aug 27, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed usability quality-of-life changes
Milestone

Comments

@harudagondi
Copy link
Owner

harudagondi commented Aug 27, 2022

Compared to kira and rodio, oddio already has support for spatial audio. We should expose it in an ergonomic api.

Solution

The MVP solution should look something like this.

  • Add Emitter component, that emits sound from its location. Its struct should be based on oddio::SpatialOptions, and its methods should be similar to bevy_oddio::Audio.
  • Add Listener component. This is where the oddio::SpatialScene should be, but it should not be where the play method is. This, should, however, have the set_listener_rotation method.

There should be several examples like:

  • A stationary listener, and an emitter that moves around it in a circle. (2D)
  • A highway, where the listener is stationary at a side, and several cars (emitters) zoom past it. (2D)
  • A Five Nights at Freddy's style camera system, where each location has its own emitters, but those emitters become softer the farther the camera from the source. (2D or 3D)

Note:

@harudagondi harudagondi added enhancement New feature or request help wanted Extra attention is needed usability quality-of-life changes labels Aug 27, 2022
@harudagondi harudagondi added this to the 0.2 milestone Aug 27, 2022
bors bot pushed a commit to bevyengine/bevy that referenced this issue Sep 3, 2022
# Objective

- Expose `mint` feature of `glam` in `bevy_math`.
- Unblocks harudagondi/bevy_oddio#22
	- [`oddio::SpatialOptions`] uses mint types

[`oddio::SpatialOptions`]: https://docs.rs/oddio/latest/oddio/struct.SpatialOptions.html

## Solution

- Added features in `bevy_math`, ~`bevy_internal`, `bevy`~
- ~Updated `docs/cargo_features.md`~

---

## Changelog

### Added

- `mint` feature in `bevy_math` to allow interoperation of glam types with mint-compatible libraries.
@harudagondi harudagondi modified the milestones: 0.2, 0.3 Sep 3, 2022
james7132 pushed a commit to james7132/bevy that referenced this issue Oct 28, 2022
# Objective

- Expose `mint` feature of `glam` in `bevy_math`.
- Unblocks harudagondi/bevy_oddio#22
	- [`oddio::SpatialOptions`] uses mint types

[`oddio::SpatialOptions`]: https://docs.rs/oddio/latest/oddio/struct.SpatialOptions.html

## Solution

- Added features in `bevy_math`, ~`bevy_internal`, `bevy`~
- ~Updated `docs/cargo_features.md`~

---

## Changelog

### Added

- `mint` feature in `bevy_math` to allow interoperation of glam types with mint-compatible libraries.
harudagondi added a commit that referenced this issue Nov 13, 2022
# Objective

- Add basic support for spatial audio
- Update to 0.9
- Unblocks #22

## Solution

- Added `play_spatial`, `play_spatial_buffered` and `set_listener_rotation`.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# Objective

- Expose `mint` feature of `glam` in `bevy_math`.
- Unblocks harudagondi/bevy_oddio#22
	- [`oddio::SpatialOptions`] uses mint types

[`oddio::SpatialOptions`]: https://docs.rs/oddio/latest/oddio/struct.SpatialOptions.html

## Solution

- Added features in `bevy_math`, ~`bevy_internal`, `bevy`~
- ~Updated `docs/cargo_features.md`~

---

## Changelog

### Added

- `mint` feature in `bevy_math` to allow interoperation of glam types with mint-compatible libraries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed usability quality-of-life changes
Projects
None yet
Development

No branches or pull requests

1 participant