skeleton & stubs
This commit is contained in:
7
crates/engine/Cargo.toml
Normal file
7
crates/engine/Cargo.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
[package]
|
||||
name = "engine"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
params = { workspace = true }
|
||||
29
crates/engine/src/lib.rs
Normal file
29
crates/engine/src/lib.rs
Normal file
@@ -0,0 +1,29 @@
|
||||
use params::{ParamId, ParamStore};
|
||||
|
||||
pub struct Engine {
|
||||
params: ParamStore,
|
||||
sample_rate: f32,
|
||||
}
|
||||
|
||||
impl Engine {
|
||||
pub fn new(params: ParamStore, sample_rate: f32) -> Self {
|
||||
Self {
|
||||
params,
|
||||
sample_rate,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_sample_rate(&mut self, rate: f32) {
|
||||
self.sample_rate = rate;
|
||||
}
|
||||
|
||||
pub fn process(&mut self, out_l: &mut [f32], out_r: &mut [f32]) {
|
||||
debug_assert_eq!(out_l.len(), out_r.len());
|
||||
out_l.fill(0.0);
|
||||
out_r.fill(0.0);
|
||||
|
||||
let _vol = self.params.get(ParamId::MasterVolume);
|
||||
}
|
||||
|
||||
pub fn midi_event(&mut self, _data: [u8; 3]) {}
|
||||
}
|
||||
Reference in New Issue
Block a user