Struct jack::ActiveClient
[−]
[src]
pub struct ActiveClient<JH: JackHandler> { /* fields omitted */ }
Methods
impl<JH: JackHandler> ActiveClient<JH>
[src]
fn deactivate(self) -> Result<(Client, JH), JackErr>
Tell the Jack server to remove this client from the process graph. Also, disconnect all ports belonging to it since inactive clients have no port connections.
The handler
that was used for Client::activate
is returned on
success. Its state may have changed due to Jack calling its methods.
In the case of error, the Client
is destroyed because its state is
unknown, and it is therefore unsafe to continue using.
Trait Implementations
impl<JH: Debug + JackHandler> Debug for ActiveClient<JH>
[src]
impl<JH: JackHandler> JackClient for ActiveClient<JH>
[src]
fn client_ptr(&self) -> *mut jack_client_t
fn close(self)
Manually close the client, deactivating if necessary. This will happen automatically on drop. Read more
fn sample_rate(&self) -> usize
The sample rate of the jack system, as set by the user when jackd was started. Read more
fn cpu_load(&self) -> f32
The current CPU load estimated by Jack. Read more
unsafe fn type_buffer_size(&self, port_type: &str) -> usize
The buffer size of a port type 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 uuid<'a>(&'a self) -> &'a str
Get the uuid of the current client.
fn name_by_uuid<'a>(&'a self, uuid: &str) -> Option<&'a str>
Get the name of the client with the UUID specified by uuid
. If the client is found then Some(name)
is returned, if not, then None
is returned. Read more
fn uuid_by_name<'a>(&'a self, name: &str) -> Option<&'a str>
Get the uuid of the client with the name specified by name
. If the client is found then Some(uuid)
is returned, if not, then None
is returned. 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 port_by_id(&self, port_id: u32) -> Option<UnownedPort>
Get a Port
by its port id.
fn port_by_name(&self, port_name: &str) -> Option<UnownedPort>
Get a Port
by its port name.
fn frames_since_cycle_start(&self) -> u32
The estimated time in frames that has passed since the Jack server began the current process cycle. Read more
fn frame_time(&self) -> u32
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. Read more
fn last_frame_time(&self) -> u32
The precise time at the start of the current process cycle. This function may only be used from the process callback, and can be used to interpret timestamps generated by self.frame_time()
in other threads, with respect to the current process cycle. Read more
fn cycle_times(&self) -> Result<CycleTimes, JackErr>
This function may only be used from the process callback. It provides the internal cycle timing information as used by most of the other time related functions. This allows the caller to map between frame counts and microseconds with full precision (i.e. without rounding frame times to integers), and also provides e.g. the microseconds time of the start of the current cycle directly (it has to be computed otherwise). Read more
fn frames_to_time(&self, n_frames: u32) -> u64
The estimated time in microseconds of the specified frame time
fn time_to_frames(&self, t: u64) -> u32
The estimated time in frames for the specified system time.
fn is_mine<PD: PortData>(&self, port: &Port<PD>) -> bool
Returns true
if the port port
belongs to this client.
impl<JH: JackHandler> Drop for ActiveClient<JH>
[src]
Closes the client, no need to manually call JackClient::close()
.