Trait jack::ProcessHandler[][src]

pub trait ProcessHandler: Send {
    fn process(&mut self, _: &Client, _process_scope: &ProcessScope) -> Control;

    fn buffer_size(&mut self, _: &Client, _size: Frames) -> Control { ... }
}
Expand description

Specifies real-time processing.

Required methods

Called whenever there is work to be done.

It needs to be suitable for real-time execution. That means that it cannot call functions that might block for a long time. This includes all I/O functions (disk, TTY, network), malloc, free, printf, pthread_mutex_lock, sleep, wait, poll, select, pthread_join, pthread_cond_wait, etc, etc.

Should return Control::Continue on success, and Control::Quit on error.

Provided methods

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.

It is called on the same thread as process, but as an exception, does not need to be suitable for real-time execution, so it is allowed to allocate new buffers to accomodate the buffer size for example.

Implementations on Foreign Types

A trivial handler that does nothing.

Return Control::Continue so that the client stays activated.

Implementors