skeleton & stubs
This commit is contained in:
37
crates/plugin-lv2/src/lib.rs
Normal file
37
crates/plugin-lv2/src/lib.rs
Normal file
@@ -0,0 +1,37 @@
|
||||
use engine::Engine;
|
||||
use lv2::prelude::*;
|
||||
use params::ParamStore;
|
||||
|
||||
#[derive(PortCollection)]
|
||||
struct Ports {
|
||||
out_l: OutputPort<Audio>,
|
||||
out_r: OutputPort<Audio>,
|
||||
}
|
||||
|
||||
#[uri("https://git.yokai.digital/deadYokai/tenko")]
|
||||
struct TenkoLv2 {
|
||||
engine: Engine,
|
||||
}
|
||||
|
||||
impl Plugin for TenkoLv2 {
|
||||
type Ports = Ports;
|
||||
type InitFeatures = ();
|
||||
type AudioFeatures = ();
|
||||
|
||||
fn new(info: &PluginInfo, _features: &mut ()) -> Option<Self> {
|
||||
let params = ParamStore::new();
|
||||
let engine = Engine::new(params, info.sample_rate() as f32);
|
||||
Some(Self { engine })
|
||||
}
|
||||
|
||||
fn run(&mut self, ports: &mut Ports, _: &mut (), _: u32) {
|
||||
for s in ports.out_l.iter_mut() {
|
||||
*s = 0.0;
|
||||
}
|
||||
for s in ports.out_r.iter_mut() {
|
||||
*s = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lv2_descriptors!(TenkoLv2);
|
||||
Reference in New Issue
Block a user