From 8a1061209c25bb762c5916aa8c69d59f5b91cd5e Mon Sep 17 00:00:00 2001 From: harudagondi Date: Mon, 29 Aug 2022 23:02:12 +0000 Subject: [PATCH] Remove `Sync` requirement in `Decodable::Decoder` (#5819) # Objective - Allow non-`Sync` Decoders - Unblocks #5422. - Unblocks harudagondi/bevy_fundsp#1 ## Solution - Remove `Sync` requirement in `Decodable::Decoder` - This aligns with kira's [`Sound`] and majority of [oddio]'s types (like [`Mixer`]). [`Sound`]: https://docs.rs/kira/latest/kira/sound/trait.Sound.html [oddio]: https://docs.rs/oddio/latest/oddio/index.html [`Mixer`]: https://docs.rs/oddio/latest/oddio/struct.Mixer.html --- ## Changelog ### Changed - `Decodable::Decoder` now no longer requires `Sync` types. --- crates/bevy_audio/src/audio_source.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_audio/src/audio_source.rs b/crates/bevy_audio/src/audio_source.rs index 4fcf2a4c36..217c9aa868 100644 --- a/crates/bevy_audio/src/audio_source.rs +++ b/crates/bevy_audio/src/audio_source.rs @@ -58,7 +58,7 @@ impl AssetLoader for AudioLoader { /// A type implementing this trait can be decoded as a rodio source pub trait Decodable: Send + Sync + 'static { /// The decoder that can decode the implementing type - type Decoder: rodio::Source + Send + Sync + Iterator; + type Decoder: rodio::Source + Send + Iterator; /// A single value given by the decoder type DecoderItem: rodio::Sample + Send + Sync;