wip: optional dependency from mixer to sampler and plugin

This commit is contained in:
🪞👃🪞 2024-08-09 15:51:06 +03:00
parent a819e042c7
commit 6dd4caeb42
18 changed files with 330 additions and 316 deletions

View file

@ -23,6 +23,18 @@ pub enum PluginKind {
}
impl Plugin {
pub fn new_lv2 (name: &str, path: &str) -> Usually<JackDevice> {
let plugin = LV2Plugin::new(path)?;
jack_from_lv2(name, &plugin.plugin)?
.run(|ports|Box::new(Self {
name: name.into(),
path: Some(String::from(path)),
plugin: Some(PluginKind::LV2(plugin)),
selected: 0,
mapping: false,
ports
}))
}
/// Create a plugin host device.
pub fn new (name: &str) -> Usually<Self> {
Ok(Self {