aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index a15f3b8..0a9123e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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>();
}
}