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

@ -45,20 +45,13 @@ impl JackClient {
}
}
pub fn transport (&self) -> Transport {
match self {
Self::Inactive(client) =>
client.transport(),
Self::Active(client) =>
client.as_client().transport(),
}
self.client().transport()
}
fn register_port <PS: PortSpec> (&self, name: &str, spec: PS) -> Usually<Port<PS>> {
Ok(match self {
Self::Inactive(client) =>
client.register_port(name, spec)?,
Self::Active(client) =>
client.as_client().register_port(name, spec)?,
})
pub fn port_by_name (&self, name: &str) -> Option<Port<Unowned>> {
self.client().port_by_name(name)
}
pub fn register_port <PS: PortSpec> (&self, name: &str, spec: PS) -> Usually<Port<PS>> {
Ok(self.client().register_port(name, spec)?)
}
pub fn activate <T: Send + Sync + 'static> (
self,