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

Expose rodio's Source and Sample trait in bevy_audio #5876

Closed
harudagondi opened this issue Sep 4, 2022 · 0 comments
Closed

Expose rodio's Source and Sample trait in bevy_audio #5876

harudagondi opened this issue Sep 4, 2022 · 0 comments
Labels
A-Audio Sounds playback and modification C-Feature A new feature, making something new possible D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@harudagondi
Copy link
Member

What problem does this solve or what need does it fill?

In bevy_audio, Decodable::Decoder requires rodio::source::Source and Decodable::DecoderItem requires rodio::Sample, which in turn, requires cpal::Sample.

Therefore, users who want to define their own Decodable types must manually import rodio and cpal.

What solution would you like?

  • pub use rodio::source::Source, rodio::Sample, and cpal::Sample.

What alternative(s) have you considered?

  • Just make the users manually import the required dependencies. This will cause problems when the user wants to use a different version of rodio and cpal for other purposes.
@harudagondi harudagondi added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Sep 4, 2022
@mockersf mockersf added A-Audio Sounds playback and modification and removed S-Needs-Triage This issue needs to be labelled labels Sep 4, 2022
@alice-i-cecile alice-i-cecile added the D-Trivial Nice and easy! A great choice to get started with Bevy label Oct 18, 2022
@bors bors bot closed this as completed in 0934abc Oct 27, 2022
james7132 pushed a commit to james7132/bevy that referenced this issue Oct 28, 2022
# Objective

- Fixes bevyengine#5876 .

## Solution

- added pub use statements to re-export the following traits in bevy_audio: rodio::source::Source, rodio::Sample, rodio::cpal::Sample.
- rodio::cpal::Sample was re-exported as CpalSample to avoid naming conflict with rodio::Sample.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# Objective

- Fixes bevyengine#5876 .

## Solution

- added pub use statements to re-export the following traits in bevy_audio: rodio::source::Source, rodio::Sample, rodio::cpal::Sample.
- rodio::cpal::Sample was re-exported as CpalSample to avoid naming conflict with rodio::Sample.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Audio Sounds playback and modification C-Feature A new feature, making something new possible D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants