diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -13,7 +13,7 @@ mod assets; pub use assets::*; #[cfg(feature = "hl4mgm")] -pub (crate) static HL4MGM: &[u8] = include_bytes!("./embedded_assets/hl4mgm.sf2"); +pub(crate) static HL4MGM: &[u8] = include_bytes!("./embedded_assets/hl4mgm.sf2"); pub(crate) static SOUNDFONT: OnceLock<Arc<SoundFont>> = OnceLock::new(); @@ -27,7 +27,9 @@ pub struct RustySynthPlugin<R: Read + Send + Sync + Clone + 'static> { #[cfg(feature = "hl4mgm")] impl Default for RustySynthPlugin<Cursor<&[u8]>> { fn default() -> Self { - Self { soundfont: Cursor::new(HL4MGM) } + Self { + soundfont: Cursor::new(HL4MGM), + } } } @@ -36,6 +38,8 @@ impl<R: Read + Send + Sync + Clone + 'static> Plugin for RustySynthPlugin<R> { let _ = SOUNDFONT.set(Arc::new( SoundFont::new(&mut self.soundfont.clone()).unwrap(), )); - app.add_audio_source::<MidiAudio>().init_asset::<MidiAudio>().init_asset_loader::<MidiAssetLoader>(); + app.add_audio_source::<MidiAudio>() + .init_asset::<MidiAudio>() + .init_asset_loader::<MidiAssetLoader>(); } } |