wip: remudolarize 4

This commit is contained in:
🪞👃🪞 2025-01-08 19:56:31 +01:00
parent 0d9a4d4830
commit e8430c373f
46 changed files with 175 additions and 63 deletions

View file

@ -1,26 +0,0 @@
include!("./lib.rs");
pub fn main () -> Usually<()> {
PluginCli::parse().run()
}
#[derive(Debug, Parser)] #[command(version, about, long_about = None)] pub struct PluginCli {
/// Name of JACK client
#[arg(short, long)] name: Option<String>,
/// Path to plugin
#[arg(short, long)] path: Option<String>,
}
impl PluginCli {
fn run (&self) -> Usually<()> {
Tui::run(JackConnection::new("tek_plugin")?.activate_with(|jack|{
let mut plugin = Plugin::new_lv2(
jack,
self.name.as_ref().map(|x|x.as_str()).unwrap_or("mixer"),
self.path.as_ref().expect("pass --path /to/lv2/plugin.so")
)?;
Ok(plugin)
})?)?;
Ok(())
}
}