bevy/examples/audio
Carter Anderson 786262a211
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-11 22:08:10 +01:00
..
audio_control.rs
audio.rs
decodable.rs
pitch.rs
soundtrack.rs
spatial_audio_2d.rs
spatial_audio_3d.rs