Loading...
Searching...
No Matches
Creating & manipulating clients

## Topics

| The non-callback API

## Functions

jack_client_t * | jack_client_open (const char *client_name, jack_options_t options, jack_status_t *status,...) JACK_OPTIONAL_WEAK_EXPORT
jack_client_t * | jack_client_new (const char *client_name) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
int | jack_client_close (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
int | jack_client_name_size (void) JACK_OPTIONAL_WEAK_EXPORT
char * | jack_get_client_name (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
char * | jack_get_uuid_for_client_name (jack_client_t *client, const char *name) JACK_WEAK_EXPORT
char * | jack_get_client_name_by_uuid (jack_client_t *client, const char *uuid) JACK_WEAK_EXPORT
int | jack_internal_client_new (const char *client_name, const char *load_name, const char *load_init) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
void | jack_internal_client_close (const char *client_name) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
int | jack_activate (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
int | jack_deactivate (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
jack_native_thread_t | jack_client_thread_id (jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT
int | jack_is_realtime (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT

## Detailed Description

Note: More documentation can be found in jack/types.h.

## Function Documentation

## jack_activate()

int jack_activate | ( | jack_client_t * | client | ) |

Tell the Jack server that the program is ready to start processing audio.

Returns
  0 on success, otherwise a non-zero error code

References jack_activate(), and JACK_OPTIONAL_WEAK_EXPORT.

Referenced by jack_activate().

## jack_client_close()

int jack_client_close | ( | jack_client_t * | client | ) |

Disconnects an external client from a JACK server.

Returns
  0 on success, otherwise a non-zero error code

References jack_client_close(), and JACK_OPTIONAL_WEAK_EXPORT.

Referenced by jack_client_close().

## jack_client_name_size()

int jack_client_name_size | ( | void |  | ) |

Returns
  the maximum number of characters in a JACK client name including the final NULL character. This value is a constant.

References jack_client_name_size(), and JACK_OPTIONAL_WEAK_EXPORT.

Referenced by jack_client_name_size().

## jack_client_new()

jack_client_t * jack_client_new | ( | const char * | client_name | ) |

THIS FUNCTION IS DEPRECATED AND SHOULD NOT BE USED IN NEW JACK CLIENTS

References jack_client_new().

Referenced by jack_client_new().

## jack_client_open()

jack_client_t * jack_client_open | ( | const char * | client_name,
|  | jack_options_t | options,
|  | jack_status_t * | status,
|  |  | ... )

Open an external client session with a JACK server. This interface is more complex but more powerful than jack_client_new(). With it, clients may choose which of several servers to connect, and control whether and how to start the server automatically, if it was not already running. There is also an option for JACK to generate a unique client name, when necessary.

Parameters

  client_name | of at most jack_client_name_size() characters. The name scope is local to each server. Unless forbidden by the JackUseExactName option, the server will modify this name to create a unique variant, if needed.
  options | formed by OR-ing together JackOptions bits. Only the JackOpenOptions bits are allowed.
  status | (if non-NULL) an address for JACK to return information from the open operation. This status word is formed by OR-ing together the relevant JackStatus bits.

Optional parameters: depending on corresponding [options bits] additional parameters may follow status (in this order).

- [JackServerName] (char *) server_name selects from among several possible concurrent server instances. Server names are unique to each user. If unspecified, use "default" unless $JACK_DEFAULT_SERVER is defined in the process environment.

Returns
  Opaque client handle if successful. If this is NULL, the open operation failed, *status includes JackFailure and the caller is not a JACK client.

References JACK_OPTIONAL_WEAK_EXPORT.

## jack_client_thread_id()

jack_native_thread_t jack_client_thread_id | ( | jack_client_t * |  | ) |

Returns
  the pthread ID of the thread running the JACK client side code.

References jack_client_thread_id(), and JACK_OPTIONAL_WEAK_EXPORT.

Referenced by jack_client_thread_id().

## jack_deactivate()

int jack_deactivate | ( | jack_client_t * | client | ) |

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.

Returns
  0 on success, otherwise a non-zero error code

References jack_deactivate(), and JACK_OPTIONAL_WEAK_EXPORT.

Referenced by jack_deactivate().

## jack_get_client_name()

char * jack_get_client_name | ( | jack_client_t * | client | ) |

Returns
  pointer to actual client name. This is useful when JackUseExactName is not specified on open and JackNameNotUnique status was returned. In that case, the actual name will differ from the client_name requested.

References jack_get_client_name(), and JACK_OPTIONAL_WEAK_EXPORT.

Referenced by jack_get_client_name().

## jack_get_client_name_by_uuid()

char * jack_get_client_name_by_uuid | ( | jack_client_t * | client,
|  | const char * | uuid )

Returns
  a pointer to the name of the client with the UUID specified by uuid.

Parameters

  client | making the request
  uuid | the uuid of the client whose name is desired

Return NULL if no such client with the given UUID exists

References jack_get_client_name_by_uuid().

Referenced by jack_get_client_name_by_uuid().

## jack_get_uuid_for_client_name()

char * jack_get_uuid_for_client_name | ( | jack_client_t * | client,
|  | const char * | name )

Returns
  pointer to a string representation of the UUID for a client named

Parameters

  name | . If no such client exists, return NULL
  client | the client making the request
  name | the name of the client whose UUID is desired

Return NULL if no such client with the given name exists

References jack_get_uuid_for_client_name().

Referenced by jack_get_uuid_for_client_name().

## jack_internal_client_close()

void jack_internal_client_close | ( | const char * | client_name | ) |

Remove an internal client from a JACK server.

Deprecated
  Please use jack_internal_client_load().

References jack_internal_client_close().

Referenced by jack_internal_client_close().

## jack_internal_client_new()

int jack_internal_client_new | ( | const char * | client_name,
|  | const char * | load_name,
|  | const char * | load_init )

Load an internal client into the Jack server.

Internal clients run inside the JACK server process. They can use most of the same functions as external clients. Each internal client must declare jack_initialize() and jack_finish() entry points, called at load and unload times. See inprocess.c for an example of how to write an internal client.

Deprecated
  Please use jack_internal_client_load().

Parameters

  client_name | of at most jack_client_name_size() characters.
  load_name | of a shared object file containing the code for the new client.
  load_init | an arbitary string passed to the jack_initialize() routine of the new client (may be NULL).

Returns
  0 if successful.

References jack_internal_client_new().

Referenced by jack_internal_client_new().

## jack_is_realtime()

int jack_is_realtime | ( | jack_client_t * | client | ) |

Parameters

  client | pointer to JACK client structure.

Check if the JACK subsystem is running with -R (–realtime).

Returns
  1 if JACK is running realtime, 0 otherwise

References jack_is_realtime(), and JACK_OPTIONAL_WEAK_EXPORT.

Referenced by jack_is_realtime().