mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-11 22:26:44 +01:00
wip: optional dependency from mixer to sampler and plugin
This commit is contained in:
parent
a819e042c7
commit
6dd4caeb42
18 changed files with 330 additions and 316 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue