pub struct JackClient { /* private fields */ }Expand description
SIM-visible JACK client with registered audio and MIDI ports.
Implementations§
Source§impl JackClient
impl JackClient
Sourcepub fn new(
name: impl Into<String>,
timing: JackTiming,
audio_inputs: usize,
audio_outputs: usize,
midi_inputs: usize,
midi_outputs: usize,
) -> Result<Self>
pub fn new( name: impl Into<String>, timing: JackTiming, audio_inputs: usize, audio_outputs: usize, midi_inputs: usize, midi_outputs: usize, ) -> Result<Self>
Builds a JACK client with the given name, timing, and port counts.
The client id is derived from name as jack/<name>/client.
§Errors
Returns an error when name is empty or when the client registers no
audio ports (both audio counts are zero).
Sourcepub fn sim_default() -> Result<Self>
pub fn sim_default() -> Result<Self>
Builds the SIM default client: name SIM, JackTiming::pro_audio_default,
two audio inputs and outputs, and one MIDI input and output.
§Errors
Returns an error if the constructed client is rejected (it is not under the default configuration).
Sourcepub fn timing(&self) -> JackTiming
pub fn timing(&self) -> JackTiming
Returns the client’s timing metadata.
Sourcepub fn audio_inputs(&self) -> usize
pub fn audio_inputs(&self) -> usize
Returns the number of registered audio input ports.
Sourcepub fn audio_outputs(&self) -> usize
pub fn audio_outputs(&self) -> usize
Returns the number of registered audio output ports.
Sourcepub fn midi_inputs(&self) -> usize
pub fn midi_inputs(&self) -> usize
Returns the number of registered MIDI input ports.
Sourcepub fn midi_outputs(&self) -> usize
pub fn midi_outputs(&self) -> usize
Returns the number of registered MIDI output ports.
Sourcepub fn direction(&self) -> HostDirection
pub fn direction(&self) -> HostDirection
Returns the client’s audio direction inferred from its port counts.
Both-sided clients (and the degenerate no-audio case) report
HostDirection::Duplex.
Sourcepub fn is_compatible_with(&self, requested: HostDirection) -> bool
pub fn is_compatible_with(&self, requested: HostDirection) -> bool
Returns whether this client can serve a stream in the requested
direction.
A client matches its own direction, and a duplex client matches any request.
Trait Implementations§
Source§impl Clone for JackClient
impl Clone for JackClient
Source§fn clone(&self) -> JackClient
fn clone(&self) -> JackClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JackClient
impl Debug for JackClient
impl Eq for JackClient
Source§impl PartialEq for JackClient
impl PartialEq for JackClient
Source§fn eq(&self, other: &JackClient) -> bool
fn eq(&self, other: &JackClient) -> bool
self and other values to be equal, and is used by ==.