prepare sampler entrypoint

This commit is contained in:
🪞👃🪞 2024-12-13 00:12:36 +01:00
parent e34a895357
commit 51351a16dc
5 changed files with 38 additions and 11 deletions

View file

@ -43,6 +43,10 @@ path = "src/cli/cli_sequencer.rs"
name = "tek_transport"
path = "src/cli/cli_transport.rs"
[[bin]]
name = "tek_sampler"
path = "src/cli/cli_sampler.rs"
#[[bin]]
#name = "tek_mixer"
#path = "src/cli_mixer.rs"
@ -51,10 +55,6 @@ path = "src/cli/cli_transport.rs"
#name = "tek_track"
#path = "src/cli_track.rs"
#[[bin]]
#name = "tek_sampler"
#path = "src/cli_sampler.rs"
#[[bin]]
#name = "tek_plugin"
#path = "src/cli_plugin.rs"

View file

View file

@ -0,0 +1,22 @@
include!("../lib.rs");
pub fn main () -> Usually<()> {
SamplerCli::parse().run()
}
#[derive(Debug, Parser)] #[command(version, about, long_about = None)] pub struct SamplerCli {
/// Name of JACK client
#[arg(short, long)] name: Option<String>,
/// Path to plugin
#[arg(short, long)] path: Option<String>,
}
impl SamplerCli {
fn run (&self) -> Usually<()> {
Tui::run(JackClient::new("tek_sampler")?.activate_with(|x|{
let sampler = SamplerTui::try_from(x)?;
Ok(sampler)
})?)?;
Ok(())
}
}

View file

@ -51,21 +51,21 @@ pub trait AudioEngine {
fn thread_init (&self, _: &Client) {}
unsafe fn shutdown (&mut self, status: ClientStatus, reason: &str) {}
unsafe fn shutdown (&mut self, _status: ClientStatus, _reason: &str) {}
fn freewheel (&mut self, _: &Client, enabled: bool) {}
fn freewheel (&mut self, _: &Client, _enabled: bool) {}
fn client_registration (&mut self, _: &Client, name: &str, reg: bool) {}
fn client_registration (&mut self, _: &Client, _name: &str, _reg: bool) {}
fn port_registration (&mut self, _: &Client, id: PortId, reg: bool) {}
fn port_registration (&mut self, _: &Client, _id: PortId, _reg: bool) {}
fn ports_connected (&mut self, _: &Client, a: PortId, b: PortId, are: bool) {}
fn ports_connected (&mut self, _: &Client, _a: PortId, _b: PortId, _are: bool) {}
fn sample_rate (&mut self, _: &Client, frames: Frames) -> Control {
fn sample_rate (&mut self, _: &Client, _frames: Frames) -> Control {
Control::Continue
}
fn port_rename (&mut self, _: &Client, id: PortId, old: &str, new: &str) -> Control {
fn port_rename (&mut self, _: &Client, _id: PortId, _old: &str, _new: &str) -> Control {
Control::Continue
}

View file

@ -93,6 +93,11 @@ impl SamplerTui {
None
}
}
impl Audio for SamplerTui {
#[inline] fn process (&mut self, client: &Client, scope: &ProcessScope) -> Control {
todo!()
}
}
pub struct AddSampleModal {
exited: bool,