mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
prepare sampler entrypoint
This commit is contained in:
parent
e34a895357
commit
51351a16dc
5 changed files with 38 additions and 11 deletions
|
|
@ -43,6 +43,10 @@ path = "src/cli/cli_sequencer.rs"
|
||||||
name = "tek_transport"
|
name = "tek_transport"
|
||||||
path = "src/cli/cli_transport.rs"
|
path = "src/cli/cli_transport.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "tek_sampler"
|
||||||
|
path = "src/cli/cli_sampler.rs"
|
||||||
|
|
||||||
#[[bin]]
|
#[[bin]]
|
||||||
#name = "tek_mixer"
|
#name = "tek_mixer"
|
||||||
#path = "src/cli_mixer.rs"
|
#path = "src/cli_mixer.rs"
|
||||||
|
|
@ -51,10 +55,6 @@ path = "src/cli/cli_transport.rs"
|
||||||
#name = "tek_track"
|
#name = "tek_track"
|
||||||
#path = "src/cli_track.rs"
|
#path = "src/cli_track.rs"
|
||||||
|
|
||||||
#[[bin]]
|
|
||||||
#name = "tek_sampler"
|
|
||||||
#path = "src/cli_sampler.rs"
|
|
||||||
|
|
||||||
#[[bin]]
|
#[[bin]]
|
||||||
#name = "tek_plugin"
|
#name = "tek_plugin"
|
||||||
#path = "src/cli_plugin.rs"
|
#path = "src/cli_plugin.rs"
|
||||||
|
|
|
||||||
0
crates/tek/src/cli/cli_groovebox.rs
Normal file
0
crates/tek/src/cli/cli_groovebox.rs
Normal file
22
crates/tek/src/cli/cli_sampler.rs
Normal file
22
crates/tek/src/cli/cli_sampler.rs
Normal 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(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -51,21 +51,21 @@ pub trait AudioEngine {
|
||||||
|
|
||||||
fn thread_init (&self, _: &Client) {}
|
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
|
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
|
Control::Continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,11 @@ impl SamplerTui {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl Audio for SamplerTui {
|
||||||
|
#[inline] fn process (&mut self, client: &Client, scope: &ProcessScope) -> Control {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub struct AddSampleModal {
|
pub struct AddSampleModal {
|
||||||
exited: bool,
|
exited: bool,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue