pub struct JackBackend { /* private fields */ }Expand description
JACK host backend with deterministic provider data.
Implementations§
Source§impl JackBackend
impl JackBackend
Sourcepub fn new(clients: Vec<JackClient>) -> Self
pub fn new(clients: Vec<JackClient>) -> Self
Builds a live backend over the given JACK clients.
The backend reports itself as connected (true) and derives its
capability set from the supplied clients’ audio, MIDI, and duplex ports.
Sourcepub fn fake() -> Self
pub fn fake() -> Self
Builds an offline backend seeded with the SIM default client.
The backend reports itself as disconnected and adds the
HostBackendCapability::Offline and HostBackendCapability::Fake
capabilities, making it suitable for validation without a running JACK
server.
Sourcepub fn list_clients(&self) -> &[JackClient]
pub fn list_clients(&self) -> &[JackClient]
Returns the JACK clients registered with this backend.
Sourcepub fn sim_client(&self) -> Option<&JackClient>
pub fn sim_client(&self) -> Option<&JackClient>
Returns the client named SIM, if one is registered.
Sourcepub fn open_sim_client(&self, capacity: usize) -> Result<HostOpenStream>
pub fn open_sim_client(&self, capacity: usize) -> Result<HostOpenStream>
Opens a duplex stream on the SIM client with a bounded buffer of
capacity frames.
§Errors
Returns an error if no SIM client is registered or if the open request is rejected.
Trait Implementations§
Source§impl Clone for JackBackend
impl Clone for JackBackend
Source§fn clone(&self) -> JackBackend
fn clone(&self) -> JackBackend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more