partially fix port autoconnect

This commit is contained in:
🪞👃🪞 2024-07-11 14:47:07 +03:00
parent 32dc708096
commit 8f3c83f8c3
3 changed files with 30 additions and 15 deletions

View file

@ -22,7 +22,7 @@ pub struct App {
pub jack: Option<JackClient>,
/// Map of external MIDI outs in the jack graph
/// to internal MIDI ins of this app.
pub midi_in: Option<Port<MidiIn>>,
pub midi_in: Option<Arc<Port<MidiIn>>>,
/// Names of ports to connect to main MIDI IN.
pub midi_ins: Vec<String>,
/// Main audio outputs.
@ -172,7 +172,6 @@ impl App {
})
.collect::<Usually<()>>())
.collect::<Usually<()>>()?;
self.midi_in = Some(midi_in);
Ok(self)
}
pub fn activate (mut self, init: Option<impl FnOnce(&Arc<RwLock<Self>>)->Usually<()>>) -> Usually<Arc<RwLock<Self>>> {