mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
autoregister sampler ports
This commit is contained in:
parent
9f739fe040
commit
120a67ba21
3 changed files with 47 additions and 28 deletions
|
|
@ -60,18 +60,7 @@ from_edn!("sampler" => |jack: &Arc<RwLock<JackClient>>, args| -> crate::Sampler
|
|||
},
|
||||
_ => panic!("unexpected in sampler {name}: {edn:?}")
|
||||
});
|
||||
let midi_in = jack.read().unwrap().client().register_port("in", MidiIn::default())?;
|
||||
Ok(Self {
|
||||
jack: jack.clone(),
|
||||
mapped: samples,
|
||||
unmapped: Default::default(),
|
||||
voices: Default::default(),
|
||||
buffer: Default::default(),
|
||||
audio_outs: vec![],
|
||||
output_gain: 0.,
|
||||
midi_in,
|
||||
name,
|
||||
})
|
||||
Self::new(jack, &name)
|
||||
});
|
||||
|
||||
type MidiSample = (Option<u7>, Arc<RwLock<crate::Sample>>);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue