mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-08-28 12:56:57 +02:00
wip: lv2 support?
This commit is contained in:
parent
4b0055a21c
commit
1e395274f6
7 changed files with 153 additions and 10 deletions
|
|
@ -1,8 +1,18 @@
|
|||
use crate::prelude::*;
|
||||
|
||||
mod lv2;
|
||||
mod vst2;
|
||||
mod vst3;
|
||||
|
||||
pub struct Plugin {
|
||||
name: String,
|
||||
plugin: Option<::vst::host::PluginInstance>
|
||||
plugin: Option<PluginKind>
|
||||
}
|
||||
|
||||
enum PluginKind {
|
||||
VST2(::vst::host::PluginInstance),
|
||||
VST3,
|
||||
LV2(::livi::Plugin),
|
||||
}
|
||||
|
||||
impl Plugin {
|
||||
|
|
@ -11,12 +21,9 @@ impl Plugin {
|
|||
name: name.into(),
|
||||
plugin: None,
|
||||
});
|
||||
let mut loader = ::vst::host::PluginLoader::load(
|
||||
&std::path::Path::new("/nix/store/ij3sz7nqg5l7v2dygdvzy3w6cj62bd6r-helm-0.9.0/lib/lxvst/helm.so"),
|
||||
device.state.clone()
|
||||
)?;
|
||||
let plugin = loader.instance()?;
|
||||
device.state.lock().unwrap().plugin = Some(plugin);
|
||||
device.state.lock().unwrap().plugin = Some(self::lv2::plug_in(
|
||||
"file:///nix/store/ij3sz7nqg5l7v2dygdvzy3w6cj62bd6r-helm-0.9.0/lib/lv2/helm.lv2"
|
||||
)?);
|
||||
Ok(device)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue