fix autoconnect input

This commit is contained in:
🪞👃🪞 2024-07-11 16:02:19 +03:00
parent ed5144f722
commit c2d6f22e46

View file

@ -33,8 +33,10 @@ pub fn main () -> Usually<()> {
let mut app = app.write().unwrap();
let jack = app.jack.as_ref().unwrap();
for name in app.midi_ins.iter() {
if let Some(port) = jack.client().port_by_name(&name) {
jack.client().connect_ports(&port, &midi_in)?;
for port in jack.client().ports(Some(name), None, PortFlags::empty()).iter() {
if let Some(port) = jack.client().port_by_name(port) {
jack.client().connect_ports(&port, &midi_in)?;
}
}
}
app.midi_in = Some(Arc::new(midi_in));