wip: nomralize

This commit is contained in:
okay stopped screaming 2026-03-21 23:29:20 +02:00
parent 35197fb826
commit 244e2b388e
16 changed files with 1880 additions and 1866 deletions

View file

@ -1,3 +1,4 @@
use crate::*;
/// A LV2 plugin.
#[derive(Debug)] #[cfg(feature = "lv2")] pub struct Lv2 {
@ -176,3 +177,30 @@ fn draw_header (state: &Lv2, to: &mut Tui, x: u16, y: u16, w: u16) {
}
#[cfg(feature = "vst2")] impl<E: Engine> ::vst::host::Host for Plugin<E> {}
#[cfg(feature = "vst2")] fn set_vst_plugin <E: Engine> (
host: &Arc<Mutex<Plugin<E>>>, _path: &str
) -> Usually<PluginKind> {
let mut loader = ::vst::host::PluginLoader::load(
&std::path::Path::new("/nix/store/ij3sz7nqg5l7v2dygdvzy3w6cj62bd6r-helm-0.9.0/lib/lxvst/helm.so"),
host.clone()
)?;
Ok(PluginKind::VST2 {
instance: loader.instance()?
})
}
#[cfg(feature = "lv2_gui")]
pub fn run_lv2_ui (mut ui: LV2PluginUI) -> Usually<JoinHandle<()>> {
Ok(spawn(move||{
let event_loop = EventLoop::builder().with_x11().with_any_thread(true).build().unwrap();
event_loop.set_control_flow(ControlFlow::Wait);
event_loop.run_app(&mut ui).unwrap()
}))
}
#[cfg(feature = "lv2_gui")]
fn lv2_ui_instantiate (kind: &str) {
//let host = Suil
}