mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
add Modal::Message to handle errors
This commit is contained in:
parent
a77536c234
commit
0a090765d3
4 changed files with 43 additions and 16 deletions
|
|
@ -38,3 +38,12 @@ pub enum Device {
|
|||
#[cfg(feature = "clap")] Clap, // TODO
|
||||
#[cfg(feature = "sf2")] Sf2, // TODO
|
||||
}
|
||||
|
||||
impl Device {
|
||||
pub fn name (&self) -> &str {
|
||||
match self {
|
||||
Self::Sampler(sampler) => sampler.name.as_ref(),
|
||||
_ => todo!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ impl Sampler {
|
|||
) -> Usually<Self> {
|
||||
let name = name.as_ref();
|
||||
Ok(Self {
|
||||
name: name.into(),
|
||||
midi_in: Some(JackMidiIn::new(jack, format!("M/{name}"), midi_from)?),
|
||||
audio_ins: vec![
|
||||
JackAudioIn::new(jack, &format!("L/{name}"), audio_from[0])?,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue