Struct jack::client::WeakClient
[−]
[src]
#[repr(C)]pub struct WeakClient(_);
Similar to a Client
, but usually exposed only through reference.
On a technical level, the difference between WeakClient
and Client
is that WeakClient
does
not close on drop.
Methods
impl WeakClient
[src]
unsafe fn from_raw(client_ptr: *mut jack_client_t) -> Self
Construct a WeakClient
.
This is mostly for use within the jack crate itself.
Trait Implementations
impl Debug for WeakClient
[src]
impl JackClient for WeakClient
[src]
fn as_ptr(&self) -> *mut jack_client_t
Expose the underlying ffi pointer. Read more
fn sample_rate(&self) -> usize
The sample rate of the JACK system, as set by the user when jackd was started.
fn cpu_load(&self) -> c_float
The current CPU load estimated by JACK. Read more
fn name<'a>(&'a self) -> &'a str
Get the name of the current client. This may differ from the name requested by Client::open
as JACK will may rename a client if necessary (ie: name collision, name too long). The name will only the be different than the one passed to Client::open
if the ClientStatus
was NAME_NOT_UNIQUE
. Read more
fn buffer_size(&self) -> JackFrames
The current maximum size that will every be passed to the process callback.
fn set_buffer_size(&self, n_frames: JackFrames) -> Result<(), JackErr>
Change the buffer size passed to the process callback. Read more
fn ports(&self,
port_name_pattern: Option<&str>,
type_name_pattern: Option<&str>,
flags: PortFlags)
-> Vec<String>
port_name_pattern: Option<&str>,
type_name_pattern: Option<&str>,
flags: PortFlags)
-> Vec<String>
Returns a vector of port names that match the specified arguments Read more
fn register_port<PS: PortSpec>(&self,
port_name: &str,
port_spec: PS)
-> Result<Port<PS>, JackErr>
port_name: &str,
port_spec: PS)
-> Result<Port<PS>, JackErr>
Create a new port for the client. This is an object used for moving data of any type in or out of the client. Ports may be connected in various ways. Read more
fn port_by_id(&self, port_id: JackPortId) -> Option<UnownedPort>
fn port_by_name(&self, port_name: &str) -> Option<UnownedPort>
Get a Port
by its port name.
fn frames_since_cycle_start(&self) -> JackFrames
The estimated time in frames that has passed since the JACK server began the current process cycle. Read more
fn frame_time(&self) -> JackFrames
The estimated current time in frames. This function is intended for use in other threads (not the process callback). The return value can be compared with the value of last_frame_time
to relate time in other threads to JACK time. To obtain better time information from within the process callback, see ProcessScope
. Read more
fn frames_to_time(&self, n_frames: JackFrames) -> JackTime
The estimated time in microseconds of the specified frame time Read more
fn time_to_frames(&self, t: JackTime) -> JackFrames
The estimated time in frames for the specified system time. Read more
fn is_mine<PS: PortSpec>(&self, port: &Port<PS>) -> bool
Returns true
if the port port
belongs to this client.
fn request_monitor_by_name(&self,
port_name: &str,
enable_monitor: bool)
-> Result<(), JackErr>
port_name: &str,
enable_monitor: bool)
-> Result<(), JackErr>
Toggle input monitoring for the port with name port_name
. Read more
fn connect_ports_by_name(&self,
source_port: &str,
destination_port: &str)
-> Result<(), JackErr>
source_port: &str,
destination_port: &str)
-> Result<(), JackErr>
Establish a connection between two ports by their full name. Read more
fn connect_ports<A: PortSpec, B: PortSpec>(&self,
source_port: &Port<A>,
destination_port: &Port<B>)
-> Result<(), JackErr>
source_port: &Port<A>,
destination_port: &Port<B>)
-> Result<(), JackErr>
Establish a connection between two ports. Read more
fn disconnect_ports<A: PortSpec, B: PortSpec>(&self,
source: &Port<A>,
destination: &Port<B>)
-> Result<(), JackErr>
source: &Port<A>,
destination: &Port<B>)
-> Result<(), JackErr>
Remove a connection between two ports.
fn disconnect_ports_by_name(&self,
source_port: &str,
destination_port: &str)
-> Result<(), JackErr>
source_port: &str,
destination_port: &str)
-> Result<(), JackErr>
Remove a connection between two ports.
unsafe fn type_buffer_size(&self, port_type: &str) -> usize
The buffer size of a port type Read more