mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-10 21:56:42 +01:00
turn Plugin keymap to match statement
This commit is contained in:
parent
cd8a808c21
commit
39407c9760
8 changed files with 124 additions and 129 deletions
|
|
@ -12,6 +12,21 @@ pub struct Plugin<E> {
|
|||
}
|
||||
|
||||
impl<E> Plugin<E> {
|
||||
/// Create a plugin host device.
|
||||
pub fn new (name: &str) -> Usually<Self> {
|
||||
Ok(Self {
|
||||
_engine: Default::default(),
|
||||
name: name.into(),
|
||||
path: None,
|
||||
plugin: None,
|
||||
selected: 0,
|
||||
mapping: false,
|
||||
ports: JackPorts::default()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Plugin<Tui> {
|
||||
pub fn new_lv2 (name: &str, path: &str) -> Usually<JackDevice<Tui>> {
|
||||
let plugin = LV2Plugin::new(path)?;
|
||||
jack_from_lv2(name, &plugin.plugin)?
|
||||
|
|
@ -25,18 +40,6 @@ impl<E> Plugin<E> {
|
|||
ports
|
||||
}))
|
||||
}
|
||||
/// Create a plugin host device.
|
||||
pub fn new (name: &str) -> Usually<Self> {
|
||||
Ok(Self {
|
||||
_engine: Default::default(),
|
||||
name: name.into(),
|
||||
path: None,
|
||||
plugin: None,
|
||||
selected: 0,
|
||||
mapping: false,
|
||||
ports: JackPorts::default()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<E> Audio for Plugin<E> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue