bevy/crates/bevy_audio
Carter Anderson 013e11a14f
AudioPlayer::new() (#16287)
# Objective

`AudioPlayer::<AudioSource>(assets.load("audio.mp3"))` is awkward and
complicated to type because the `AudioSource` generic type cannot be
elided. This is especially annoying because `AudioSource` is used in the
majority of cases. Most users don't need to think about it.

## Solution

Add an `AudioPlayer::new()` function that is hard-coded to
`AudioSource`, allowing `AudioPlayer::new(assets.load("audio.mp3"))`.
Prefer using that in the relevant places.
2024-11-08 01:51:50 +00:00
..
src AudioPlayer::new() (#16287) 2024-11-08 01:51:50 +00:00
Cargo.toml Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
CONTRIBUTING.md Fix a few "repeated word" typos (#13955) 2024-06-20 21:35:20 +00:00
README.md Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00

Bevy Audio

License Crates.io Downloads Docs Discord