Function jack_client::callbacks::register_callbacks [] [src]

pub unsafe fn register_callbacks<T: JackHandler>(
    client: *mut jack_client_t,
    handler: T
) -> Result<*mut T, ()>

Registers methods from handler to be used by Jack with client.

Returns Ok(handler_ptr) on success, or Err(JackErr::CallbackRegistrationError) on failure.

Registers handler with jack. All jack calls to client will be handled by handler. handler is consumed, but it is not deallocated. handler should be manually deallocated when jack will no longer make calls to it, such as when registering new callbacks with the same client, or dropping the client.

TODO

  • Handled failed registrations
  • Fix jack_set_port_rename_callback

Unsafe

  • handler will not be automatically deallocated.