Jack2: The API for starting and controlling a JACK server

Jack2 1.9.12

Functions
The API for starting and controlling a JACK server

## Functions
jackctl_sigmask_t * | jackctl_setup_signals (unsigned int flags)
void | jackctl_wait_signals (jackctl_sigmask_t *signals)
jackctl_server_t * | jackctl_server_create (bool(*on_device_acquire)(const char *device_name), void(*on_device_release)(const char *device_name))
void | jackctl_server_destroy (jackctl_server_t *server)
bool | jackctl_server_open (jackctl_server_t *server, jackctl_driver_t *driver)
bool | jackctl_server_start (jackctl_server_t *server)
bool | jackctl_server_stop (jackctl_server_t *server)
bool | jackctl_server_close (jackctl_server_t *server)
const JSList * | jackctl_server_get_drivers_list (jackctl_server_t *server)
const JSList * | jackctl_server_get_parameters (jackctl_server_t *server)
const JSList * | jackctl_server_get_internals_list (jackctl_server_t *server)
bool | jackctl_server_load_internal (jackctl_server_t *server, jackctl_internal_t *internal)
bool | jackctl_server_unload_internal (jackctl_server_t *server, jackctl_internal_t *internal)
bool | jackctl_server_load_session_file (jackctl_server_t *server_ptr, const char *file)
bool | jackctl_server_add_slave (jackctl_server_t *server, jackctl_driver_t *driver)
bool | jackctl_server_remove_slave (jackctl_server_t *server, jackctl_driver_t *driver)
bool | jackctl_server_switch_master (jackctl_server_t *server, jackctl_driver_t *driver)
const char * | jackctl_driver_get_name (jackctl_driver_t *driver)
jackctl_driver_type_t | jackctl_driver_get_type (jackctl_driver_t *driver)
const JSList * | jackctl_driver_get_parameters (jackctl_driver_t *driver)
int | jackctl_driver_params_parse (jackctl_driver_t *driver, int argc, char *argv[])
const char * | jackctl_internal_get_name (jackctl_internal_t *internal)
const JSList * | jackctl_internal_get_parameters (jackctl_internal_t *internal)
const char * | jackctl_parameter_get_name (jackctl_parameter_t *parameter)
const char * | jackctl_parameter_get_short_description (jackctl_parameter_t *parameter)
const char * | jackctl_parameter_get_long_description (jackctl_parameter_t *parameter)
jackctl_param_type_t | jackctl_parameter_get_type (jackctl_parameter_t *parameter)
char | jackctl_parameter_get_id (jackctl_parameter_t *parameter)
bool | jackctl_parameter_is_set (jackctl_parameter_t *parameter)
bool | jackctl_parameter_reset (jackctl_parameter_t *parameter)
union jackctl_parameter_value | jackctl_parameter_get_value (jackctl_parameter_t *parameter)
bool | jackctl_parameter_set_value (jackctl_parameter_t *parameter, const union jackctl_parameter_value *value_ptr)
union jackctl_parameter_value | jackctl_parameter_get_default_value (jackctl_parameter_t *parameter)
bool | jackctl_parameter_has_range_constraint (jackctl_parameter_t *parameter)
bool | jackctl_parameter_has_enum_constraint (jackctl_parameter_t *parameter)
uint32_t | jackctl_parameter_get_enum_constraints_count (jackctl_parameter_t *parameter)
union jackctl_parameter_value | jackctl_parameter_get_enum_constraint_value (jackctl_parameter_t *parameter, uint32_t index)
const char * | jackctl_parameter_get_enum_constraint_description (jackctl_parameter_t *parameter, uint32_t index)
void | jackctl_parameter_get_range_constraint (jackctl_parameter_t *parameter, union jackctl_parameter_value *min_ptr, union jackctl_parameter_value *max_ptr)
bool | jackctl_parameter_constraint_is_strict (jackctl_parameter_t *parameter)
bool | jackctl_parameter_constraint_is_fake_value (jackctl_parameter_t *parameter)
void | jack_error (const char *format,...)
void | jack_info (const char *format,...)
void | jack_log (const char *format,...)

## Detailed Description

## Function Documentation

## ◆ jackctl_setup_signals()

jackctl_sigmask_t* jackctl_setup_signals | ( | unsigned int | flags | ) |

Call this function to setup process signal handling. As a general rule, it is required for proper operation for the server object.

Parameters

  flags | signals setup flags, use 0 for none. Currently no flags are defined

Returns
  the configurated signal set.

Definition at line 596 of file JackControlAPI.cpp.

## ◆ jackctl_wait_signals()

void jackctl_wait_signals | ( | jackctl_sigmask_t * | signals | ) |

Call this function to wait on a signal set.

Parameters

  signals | signals set to wait on

Definition at line 678 of file JackControlAPI.cpp.

## ◆ jackctl_server_create()

jackctl_server_t* jackctl_server_create | ( | bool(*)(const char *device_name) | on_device_acquire,
|  | void(*)(const char *device_name) | on_device_release
| ) |  |

Call this function to create server object.

Parameters

  on_device_acquire | - Optional callback to be called before device is acquired. If false is returned, device usage will fail
  on_device_release | - Optional callback to be called after device is released.

Returns
  server object handle, NULL if creation of server object failed. Successfully created server object must be destroyed with paired call to jackctl_server_destroy

Definition at line 744 of file JackControlAPI.cpp.

## ◆ jackctl_server_destroy()

void jackctl_server_destroy | ( | jackctl_server_t * | server | ) |

Call this function to destroy server object.

Parameters

  server | server object handle to destroy

Definition at line 943 of file JackControlAPI.cpp.

## ◆ jackctl_server_open()

bool jackctl_server_open | ( | jackctl_server_t * | server,
|  | jackctl_driver_t * | driver
| ) |  |

Call this function to open JACK server

Parameters

  server | server object handle
  driver | driver to use

Returns
  success status: true - success, false - fail

Definition at line 1001 of file JackControlAPI.cpp.

## ◆ jackctl_server_start()

bool jackctl_server_start | ( | jackctl_server_t * | server | ) |

Call this function to start JACK server

Parameters

  server | server object handle

Returns
  success status: true - success, false - fail

Definition at line 1100 of file JackControlAPI.cpp.

## ◆ jackctl_server_stop()

bool jackctl_server_stop | ( | jackctl_server_t * | server | ) |

Call this function to stop JACK server

Parameters

  server | server object handle

Returns
  success status: true - success, false - fail

Definition at line 958 of file JackControlAPI.cpp.

## ◆ jackctl_server_close()

bool jackctl_server_close | ( | jackctl_server_t * | server | ) |

Call this function to close JACK server

Parameters

  server | server object handle

Returns
  success status: true - success, false - fail

Definition at line 968 of file JackControlAPI.cpp.

## ◆ jackctl_server_get_drivers_list()

const JSList* jackctl_server_get_drivers_list | ( | jackctl_server_t * | server | ) |

Call this function to get list of available drivers. List node data pointers is a driver object handle (jackctl_driver_t).

Parameters

  server | server object handle to get drivers for

Returns
  Single linked list of driver object handles. Must not be modified. Always same for same server object.

Definition at line 953 of file JackControlAPI.cpp.

## ◆ jackctl_server_get_parameters()

const JSList* jackctl_server_get_parameters | ( | jackctl_server_t * | server | ) |

Call this function to get list of server parameters. List node data pointers is a parameter object handle (jackctl_parameter_t).

Parameters

  server | server object handle to get parameters for

Returns
  Single linked list of parameter object handles. Must not be modified. Always same for same server object.

Definition at line 995 of file JackControlAPI.cpp.

## ◆ jackctl_server_get_internals_list()

const JSList* jackctl_server_get_internals_list | ( | jackctl_server_t * | server | ) |

Call this function to get list of available internal clients. List node data pointers is a internal client object handle (jackctl_internal_t).

Parameters

  server | server object handle to get internal clients for

Returns
  Single linked list of internal client object handles. Must not be modified. Always same for same server object.

Definition at line 1315 of file JackControlAPI.cpp.

## ◆ jackctl_server_load_internal()

bool jackctl_server_load_internal | ( | jackctl_server_t * | server,
|  | jackctl_internal_t * | internal
| ) |  |

Call this function to load one internal client. (can be used when the server is running)

Parameters

  server | server object handle
  internal | internal to use

Returns
  success status: true - success, false - fail

Definition at line 1330 of file JackControlAPI.cpp.

## ◆ jackctl_server_unload_internal()

bool jackctl_server_unload_internal | ( | jackctl_server_t * | server,
|  | jackctl_internal_t * | internal
| ) |  |

Call this function to unload one internal client. (can be used when the server is running)

Parameters

  server | server object handle
  internal | internal to unload

Returns
  success status: true - success, false - fail

Definition at line 1350 of file JackControlAPI.cpp.

## ◆ jackctl_server_load_session_file()

bool jackctl_server_load_session_file | ( | jackctl_server_t * | server_ptr,
|  | const char * | file
| ) |  |

Call this function to load a session file. (can be used when the server is running)

Parameters

  server | server object handle
  file | the session file to load, containing a list of internal clients and connections to be made.

Returns
  success status: true - success, false - fail

Definition at line 1367 of file JackControlAPI.cpp.

## ◆ jackctl_server_add_slave()

bool jackctl_server_add_slave | ( | jackctl_server_t * | server,
|  | jackctl_driver_t * | driver
| ) |  |

Call this function to add a slave in the driver slave list. (cannot be used when the server is running that is between jackctl_server_start and jackctl_server_stop)

Parameters

  server | server object handle
  driver | driver to add in the driver slave list.

Returns
  success status: true - success, false - fail

Definition at line 1378 of file JackControlAPI.cpp.

## ◆ jackctl_server_remove_slave()

bool jackctl_server_remove_slave | ( | jackctl_server_t * | server,
|  | jackctl_driver_t * | driver
| ) |  |

Call this function to remove a slave from the driver slave list. (cannot be used when the server is running that is between jackctl_server_start and jackctl_server_stop)

Parameters

  server | server object handle
  driver | driver to remove from the driver slave list.

Returns
  success status: true - success, false - fail

Definition at line 1401 of file JackControlAPI.cpp.

## ◆ jackctl_server_switch_master()

bool jackctl_server_switch_master | ( | jackctl_server_t * | server,
|  | jackctl_driver_t * | driver
| ) |  |

Call this function to switch master driver.

Parameters

  server | server object handle
  driver | driver to switch to

Returns
  success status: true - success, false - fail

Definition at line 1424 of file JackControlAPI.cpp.

## ◆ jackctl_driver_get_name()

const char* jackctl_driver_get_name | ( | jackctl_driver_t * | driver | ) |

Call this function to get name of driver.

Parameters

  driver | driver object handle to get name of

Returns
  driver name. Must not be modified. Always same for same driver object.

Definition at line 1116 of file JackControlAPI.cpp.

## ◆ jackctl_driver_get_type()

jackctl_driver_type_t jackctl_driver_get_type | ( | jackctl_driver_t * | driver | ) |

Call this function to get type of driver.

Parameters

  driver | driver object handle to get name of

Returns
  driver type. Must not be modified. Always same for same driver object.

Definition at line 1121 of file JackControlAPI.cpp.

## ◆ jackctl_driver_get_parameters()

const JSList* jackctl_driver_get_parameters | ( | jackctl_driver_t * | driver | ) |

Call this function to get list of driver parameters. List node data pointers is a parameter object handle (jackctl_parameter_t).

Parameters

  driver | driver object handle to get parameters for

Returns
  Single linked list of parameter object handles. Must not be modified. Always same for same driver object.

Definition at line 1126 of file JackControlAPI.cpp.

## ◆ jackctl_driver_params_parse()

int jackctl_driver_params_parse | ( | jackctl_driver_t * | driver,
|  | int | argc,
|  | char * | argv[]
| ) |  |

Call this function to parse parameters for a driver.

Parameters

  driver | driver object handle
  argc | parameter list len
  argv | parameter list, as an array of char*

Returns
  success status: true - success, false - fail

Definition at line 264 of file JackDriverLoader.cpp.

## ◆ jackctl_internal_get_name()

const char* jackctl_internal_get_name | ( | jackctl_internal_t * | internal | ) |

Call this function to get name of internal client.

Parameters

  internal | internal object handle to get name of

Returns
  internal name. Must not be modified. Always same for same internal object.

Definition at line 1320 of file JackControlAPI.cpp.

## ◆ jackctl_internal_get_parameters()

const JSList* jackctl_internal_get_parameters | ( | jackctl_internal_t * | internal | ) |

Call this function to get list of internal parameters. List node data pointers is a parameter object handle (jackctl_parameter_t).

Parameters

  internal | internal object handle to get parameters for

Returns
  Single linked list of parameter object handles. Must not be modified. Always same for same internal object.

Definition at line 1325 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_name()

const char* jackctl_parameter_get_name | ( | jackctl_parameter_t * | parameter | ) |

Call this function to get parameter name.

Parameters

  parameter | parameter object handle to get name of

Returns
  parameter name. Must not be modified. Always same for same parameter object.

Definition at line 1136 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_short_description()

const char* jackctl_parameter_get_short_description | ( | jackctl_parameter_t * | parameter | ) |

Call this function to get parameter short description.

Parameters

  parameter | parameter object handle to get short description of

Returns
  parameter short description. Must not be modified. Always same for same parameter object.

Definition at line 1141 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_long_description()

const char* jackctl_parameter_get_long_description | ( | jackctl_parameter_t * | parameter | ) |

Call this function to get parameter long description.

Parameters

  parameter | parameter object handle to get long description of

Returns
  parameter long description. Must not be modified. Always same for same parameter object.

Definition at line 1146 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_type()

jackctl_param_type_t jackctl_parameter_get_type | ( | jackctl_parameter_t * | parameter | ) |

Call this function to get parameter type.

Parameters

  parameter | parameter object handle to get type of

Returns
  parameter type. Always same for same parameter object.

Definition at line 1246 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_id()

char jackctl_parameter_get_id | ( | jackctl_parameter_t * | parameter | ) |

Call this function to get parameter character.

Parameters

  parameter | parameter object handle to get character of

Returns
  character.

Definition at line 1251 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_is_set()

bool jackctl_parameter_is_set | ( | jackctl_parameter_t * | parameter | ) |

Call this function to check whether parameter has been set, or its default value is being used.

Parameters

  parameter | parameter object handle to check

Returns
  true - parameter is set, false - parameter is using default value.

Definition at line 1256 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_reset()

bool jackctl_parameter_reset | ( | jackctl_parameter_t * | parameter | ) |

Call this function to reset parameter to its default value.

Parameters

  parameter | parameter object handle to reset value of

Returns
  success status: true - success, false - fail

Definition at line 1272 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_value()

union jackctl_parameter_value jackctl_parameter_get_value | ( | jackctl_parameter_t * | parameter | ) |

Call this function to get parameter value.

Parameters

  parameter | parameter object handle to get value of

Returns
  parameter value.

Definition at line 1261 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_set_value()

bool jackctl_parameter_set_value | ( | jackctl_parameter_t * | parameter,
|  | const union jackctl_parameter_value * | value_ptr
| ) |  |

Call this function to set parameter value.

Parameters

  parameter | parameter object handle to get value of
  value_ptr | pointer to variable containing parameter value

Returns
  success status: true - success, false - fail

Definition at line 1290 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_default_value()

union jackctl_parameter_value jackctl_parameter_get_default_value | ( | jackctl_parameter_t * | parameter | ) |

Call this function to get parameter default value.

Parameters

  parameter | parameter object handle to get default value of

Returns
  parameter default value.

Definition at line 1302 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_has_range_constraint()

bool jackctl_parameter_has_range_constraint | ( | jackctl_parameter_t * | parameter | ) |

Call this function check whether parameter has range constraint.

Parameters

  parameter | object handle of parameter to check

Returns
  whether parameter has range constraint.

Definition at line 1151 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_has_enum_constraint()

bool jackctl_parameter_has_enum_constraint | ( | jackctl_parameter_t * | parameter | ) |

Call this function check whether parameter has enumeration constraint.

Parameters

  parameter | object handle of parameter to check

Returns
  whether parameter has enumeration constraint.

Definition at line 1156 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_enum_constraints_count()

uint32_t jackctl_parameter_get_enum_constraints_count | ( | jackctl_parameter_t * | parameter | ) |

Call this function get how many enumeration values parameter has.

Parameters

  parameter | object handle of parameter

Returns
  number of enumeration values

Definition at line 1161 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_enum_constraint_value()

union jackctl_parameter_value jackctl_parameter_get_enum_constraint_value | ( | jackctl_parameter_t * | parameter,
|  | uint32_t | index
| ) |  |

Call this function to get parameter enumeration value.

Parameters

  parameter | object handle of parameter
  index | index of parameter enumeration value

Returns
  enumeration value.

Definition at line 1175 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_enum_constraint_description()

const char* jackctl_parameter_get_enum_constraint_description | ( | jackctl_parameter_t * | parameter,
|  | uint32_t | index
| ) |  |

Call this function to get parameter enumeration value description.

Parameters

  parameter | object handle of parameter
  index | index of parameter enumeration value

Returns
  enumeration value description.

Definition at line 1209 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_get_range_constraint()

void jackctl_parameter_get_range_constraint | ( | jackctl_parameter_t * | parameter,
|  | union jackctl_parameter_value * | min_ptr,
|  | union jackctl_parameter_value * | max_ptr
| ) |  |

Call this function to get parameter range.

Parameters

  parameter | object handle of parameter
  min_ptr | pointer to variable receiving parameter minimum value
  max_ptr | pointer to variable receiving parameter maximum value

Definition at line 1214 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_constraint_is_strict()

bool jackctl_parameter_constraint_is_strict | ( | jackctl_parameter_t * | parameter | ) |

Call this function to check whether parameter constraint is strict, i.e. whether supplying non-matching value will not work for sure.

Parameters

  parameter | parameter object handle to check

Returns
  whether parameter constraint is strict.

Definition at line 1236 of file JackControlAPI.cpp.

## ◆ jackctl_parameter_constraint_is_fake_value()

bool jackctl_parameter_constraint_is_fake_value | ( | jackctl_parameter_t * | parameter | ) |

Call this function to check whether parameter has fake values, i.e. values have no user meaningful meaning and only value description is meaningful to user.

Parameters

  parameter | parameter object handle to check

Returns
  whether parameter constraint is strict.

Definition at line 1241 of file JackControlAPI.cpp.

## ◆ jack_error()

void jack_error | ( | const char * | format,
|  |  | ...
| ) |  |

Call this function to log an error message.

Parameters

  format | string

Definition at line 92 of file JackError.cpp.

## ◆ jack_info()

void jack_info | ( | const char * | format,
|  |  | ...
| ) |  |

Call this function to log an information message.

Parameters

  format | string

Definition at line 100 of file JackError.cpp.

## ◆ jack_log()

void jack_log | ( | const char * | format,
|  |  | ...
| ) |  |

Call this function to log an information message but only when verbose mode is enabled.

Parameters

  format | string

Definition at line 108 of file JackError.cpp.