mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
port connections; DevicePorts -> PortList
This commit is contained in:
parent
b1df7bf4e6
commit
22b44f562b
8 changed files with 117 additions and 77 deletions
|
|
@ -27,6 +27,23 @@ impl Chain {
|
|||
}
|
||||
}
|
||||
|
||||
impl PortList for Chain {
|
||||
fn midi_ins (&self) -> Usually<Vec<String>> {
|
||||
if let Some(device) = self.items.get(0) {
|
||||
device.midi_ins()
|
||||
} else {
|
||||
Ok(vec![])
|
||||
}
|
||||
}
|
||||
fn audio_outs (&self) -> Usually<Vec<String>> {
|
||||
if let Some(device) = self.items.get(self.items.len().saturating_sub(1)) {
|
||||
device.audio_outs()
|
||||
} else {
|
||||
Ok(vec![])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn process (_: &mut Chain, _: &Client, _: &ProcessScope) -> Control {
|
||||
Control::Continue
|
||||
}
|
||||
|
|
@ -238,5 +255,3 @@ pub fn handle (state: &mut Chain, event: &AppEvent) -> Usually<bool> {
|
|||
|s: &mut Chain|s.handle_focus(&FocusEvent::Outward)]
|
||||
}))
|
||||
}
|
||||
|
||||
impl DevicePorts for Chain {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue