bevy/crates/bevy_audio/src
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
..
audio.rs AudioPlayer::new() (#16287) 2024-11-08 01:51:50 +00:00
audio_output.rs Fix audio not playing (#15638) 2024-10-04 01:07:09 +00:00
audio_source.rs Cleanup unneeded lifetimes in bevy_asset (#15546) 2024-09-30 21:54:59 +00:00
lib.rs AudioPlayer::new() (#16287) 2024-11-08 01:51:50 +00:00
pitch.rs Migrate audio to required components (#15573) 2024-10-01 22:43:29 +00:00
sinks.rs Migrate audio to required components (#15573) 2024-10-01 22:43:29 +00:00