aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <silas@exvacuum.dev>2024-09-19 16:05:28 -0400
committerLibravatar Silas Bartha <silas@exvacuum.dev>2024-09-19 16:05:28 -0400
commit86d578c587be1874ff7923c4c1056cadd3a46130 (patch)
tree56679b3b3f72d9a5e9b922985fd4f19cdaa93b9f /src/lib.rs
parent8e98b888a45d7cd56f084a2a2c3793797447ffe7 (diff)
Added basic note-sequence source support and removed multithreading dependencyv0.2.0
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>();
}
}