Struct jack::ClosureProcessHandler
source · pub struct ClosureProcessHandler<F: 'static + Send + FnMut(&Client, &ProcessScope) -> Control> {
pub process_fn: F,
}
Expand description
Wrap a closure that can handle the process
callback. This is called every time data from ports
is available from JACK.
Fields§
§process_fn: F
Implementations§
source§impl<F> ClosureProcessHandler<F>where
F: 'static + Send + FnMut(&Client, &ProcessScope) -> Control,
impl<F> ClosureProcessHandler<F>where
F: 'static + Send + FnMut(&Client, &ProcessScope) -> Control,
pub fn new(f: F) -> ClosureProcessHandler<F>
Trait Implementations§
source§impl<F> ProcessHandler for ClosureProcessHandler<F>where
F: 'static + Send + FnMut(&Client, &ProcessScope) -> Control,
impl<F> ProcessHandler for ClosureProcessHandler<F>where
F: 'static + Send + FnMut(&Client, &ProcessScope) -> Control,
source§fn process(&mut self, c: &Client, ps: &ProcessScope) -> Control
fn process(&mut self, c: &Client, ps: &ProcessScope) -> Control
Called whenever there is work to be done. Read more
source§const SLOW_SYNC: bool = false
const SLOW_SYNC: bool = false
Indicates whether or not this process handler represents a
slow-sync client
source§fn buffer_size(&mut self, _: &Client, _size: Frames) -> Control
fn buffer_size(&mut self, _: &Client, _size: Frames) -> Control
Called whenever the size of the buffer that will be passed to
process
is about to change, and once before the first call to process
. Read moresource§fn sync(
&mut self,
_: &Client,
_state: TransportState,
_pos: &TransportPosition
) -> bool
fn sync(
&mut self,
_: &Client,
_state: TransportState,
_pos: &TransportPosition
) -> bool
For slow-sync clients, called periodically when the transport position
is changed. The transport will not start rolling until all clients
indicate they are ready, or a timeout occurs. Read more