mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-10 21:56:42 +01:00
wip: down to 25 errors woo
This commit is contained in:
parent
89288f2920
commit
6ce83fb27a
25 changed files with 688 additions and 620 deletions
|
|
@ -1,5 +1,9 @@
|
|||
use crate::*;
|
||||
|
||||
#[tengri_proc::command(JackMidiOut)]
|
||||
impl MidiOutputCommand {
|
||||
}
|
||||
|
||||
impl<T: Has<Vec<JackMidiOut>>> HasMidiOuts for T {
|
||||
fn midi_outs (&self) -> &Vec<JackMidiOut> {
|
||||
self.get()
|
||||
|
|
@ -25,9 +29,19 @@ pub trait HasMidiOuts {
|
|||
data
|
||||
})
|
||||
}
|
||||
fn midi_out_add (&mut self, jack: &Jack) -> Usually<()> {
|
||||
}
|
||||
|
||||
/// Trail for thing that may gain new MIDI ports.
|
||||
impl<T: HasMidiOuts + HasJack> AddMidiOut for T {
|
||||
fn midi_out_add (&mut self) -> Usually<()> {
|
||||
let index = self.midi_outs().len();
|
||||
self.midi_outs_mut().push(JackMidiOut::new(&jack, &format!("{index}/M"), &[])?);
|
||||
let port = JackMidiOut::new(self.jack(), &format!("{index}/M"), &[])?;
|
||||
self.midi_outs_mut().push(port);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// May create new MIDI output ports.
|
||||
pub trait AddMidiOut {
|
||||
fn midi_out_add (&mut self) -> Usually<()>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue