| jack.h | | jack.h | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 80 | |
| /** | | /** | |
| * Call this function to get version of the JACK, in form of a string | | * Call this function to get version of the JACK, in form of a string | |
| * | | * | |
| * @return Human readable string describing JACK version being used. | | * @return Human readable string describing JACK version being used. | |
| * | | * | |
| */ | | */ | |
| const char * | | const char * | |
| jack_get_version_string() JACK_OPTIONAL_WEAK_EXPORT; | | jack_get_version_string() JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
|
| | | * @defgroup ClientFunctions Creating & manipulating clients | |
| | | * @{ | |
| | | */ | |
| | | | |
| | | /** | |
| * Open an external client session with a JACK server. This interface | | * Open an external client session with a JACK server. This interface | |
| * is more complex but more powerful than jack_client_new(). With it, | | * is more complex but more powerful than jack_client_new(). With it, | |
| * clients may choose which of several servers to connect, and control | | * clients may choose which of several servers to connect, and control | |
| * whether and how to start the server automatically, if it was not | | * whether and how to start the server automatically, if it was not | |
| * already running. There is also an option for JACK to generate a | | * already running. There is also an option for JACK to generate a | |
| * unique client name, when necessary. | | * unique client name, when necessary. | |
| * | | * | |
| * @param client_name of at most jack_client_name_size() characters. | | * @param client_name of at most jack_client_name_size() characters. | |
| * The name scope is local to each server. Unless forbidden by the | | * The name scope is local to each server. Unless forbidden by the | |
| * @ref JackUseExactName option, the server will modify this name to | | * @ref JackUseExactName option, the server will modify this name to | |
| | | | |
| skipping to change at line 173 | | skipping to change at line 178 | |
| * | | * | |
| * @return 0 if successful. | | * @return 0 if successful. | |
| */ | | */ | |
| int jack_internal_client_new (const char *client_name, | | int jack_internal_client_new (const char *client_name, | |
| const char *load_name, | | const char *load_name, | |
| const char *load_init) JACK_OPTIONAL_WEAK_DEP
RECATED_EXPORT; | | const char *load_init) JACK_OPTIONAL_WEAK_DEP
RECATED_EXPORT; | |
| | | | |
| /** | | /** | |
| * Remove an internal client from a JACK server. | | * Remove an internal client from a JACK server. | |
| * | | * | |
|
| * @deprecated Please use jack_internal_client_load(). | | * @deprecated Please use jack_internal_client_unload(). | |
| */ | | */ | |
| void jack_internal_client_close (const char *client_name) JACK_OPTIONAL_WEA
K_DEPRECATED_EXPORT; | | void jack_internal_client_close (const char *client_name) JACK_OPTIONAL_WEA
K_DEPRECATED_EXPORT; | |
| | | | |
| /** | | /** | |
| * Tell the Jack server that the program is ready to start processing | | * Tell the Jack server that the program is ready to start processing | |
| * audio. | | * audio. | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
| int jack_activate (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT; | | int jack_activate (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| skipping to change at line 201 | | skipping to change at line 206 | |
| */ | | */ | |
| int jack_deactivate (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT; | | int jack_deactivate (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return pid of client. If not available, 0 will be returned. | | * @return pid of client. If not available, 0 will be returned. | |
| */ | | */ | |
| int jack_get_client_pid (const char *name) JACK_OPTIONAL_WEAK_EXPORT; | | int jack_get_client_pid (const char *name) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return the pthread ID of the thread running the JACK client side | | * @return the pthread ID of the thread running the JACK client side | |
|
| * code. | | * real-time code. | |
| */ | | */ | |
|
| jack_native_thread_t jack_client_thread_id (jack_client_t *) JACK_OPTIONAL_
WEAK_EXPORT; | | jack_native_thread_t jack_client_thread_id (jack_client_t *client) JACK_OPT
IONAL_WEAK_EXPORT; | |
| | | | |
| /*@}*/ | | /*@}*/ | |
| | | | |
| /** | | /** | |
| * @param client pointer to JACK client structure. | | * @param client pointer to JACK client structure. | |
| * | | * | |
| * Check if the JACK subsystem is running with -R (--realtime). | | * Check if the JACK subsystem is running with -R (--realtime). | |
| * | | * | |
| * @return 1 if JACK is running realtime, 0 otherwise | | * @return 1 if JACK is running realtime, 0 otherwise | |
| */ | | */ | |
| | | | |
| skipping to change at line 227 | | skipping to change at line 232 | |
| * @defgroup NonCallbackAPI The non-callback API | | * @defgroup NonCallbackAPI The non-callback API | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \bold THIS FUNCTION IS DEPRECATED AND SHOULD NOT BE USED IN | | * \bold THIS FUNCTION IS DEPRECATED AND SHOULD NOT BE USED IN | |
| * NEW JACK CLIENTS. | | * NEW JACK CLIENTS. | |
| * | | * | |
| * @deprecated Please use jack_cycle_wait() and jack_cycle_signal() functio
ns. | | * @deprecated Please use jack_cycle_wait() and jack_cycle_signal() functio
ns. | |
| */ | | */ | |
|
| jack_nframes_t jack_thread_wait (jack_client_t*, int status) JACK_OPTIONAL_
WEAK_EXPORT; | | jack_nframes_t jack_thread_wait (jack_client_t *client, int status) JACK_OP
TIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Wait until this JACK client should process data. | | * Wait until this JACK client should process data. | |
| * | | * | |
| * @param client - pointer to a JACK client structure | | * @param client - pointer to a JACK client structure | |
| * | | * | |
| * @return the number of frames of data to process | | * @return the number of frames of data to process | |
| */ | | */ | |
| jack_nframes_t jack_cycle_wait (jack_client_t* client) JACK_OPTIONAL_WEAK_E
XPORT; | | jack_nframes_t jack_cycle_wait (jack_client_t* client) JACK_OPTIONAL_WEAK_E
XPORT; | |
| | | | |
| | | | |
| skipping to change at line 435 | | skipping to change at line 440 | |
| * | | * | |
| * All "notification events" are received in a seperated non RT thread, | | * All "notification events" are received in a seperated non RT thread, | |
| * the code in the supplied function does not need to be | | * the code in the supplied function does not need to be | |
| * suitable for real-time execution. | | * suitable for real-time execution. | |
| * | | * | |
| * NOTE: this function cannot be called while the client is activated | | * NOTE: this function cannot be called while the client is activated | |
| * (after jack_activate has been called.) | | * (after jack_activate has been called.) | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_set_client_registration_callback (jack_client_t *, | | int jack_set_client_registration_callback (jack_client_t *client, | |
| JackClientRegistrationCallback | | JackClientRegistrationCallback | |
| registration_callback, void *arg | | registration_callback, void *ar | |
| ) JACK_OPTIONAL_WEAK_EXPORT; | | g) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Tell the JACK server to call @a registration_callback whenever a | | * Tell the JACK server to call @a registration_callback whenever a | |
| * port is registered or unregistered, passing @a arg as a parameter. | | * port is registered or unregistered, passing @a arg as a parameter. | |
| * | | * | |
| * All "notification events" are received in a seperated non RT thread, | | * All "notification events" are received in a seperated non RT thread, | |
| * the code in the supplied function does not need to be | | * the code in the supplied function does not need to be | |
| * suitable for real-time execution. | | * suitable for real-time execution. | |
| * | | * | |
| * NOTE: this function cannot be called while the client is activated | | * NOTE: this function cannot be called while the client is activated | |
| * (after jack_activate has been called.) | | * (after jack_activate has been called.) | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_set_port_registration_callback (jack_client_t *, | | int jack_set_port_registration_callback (jack_client_t *client, | |
| JackPortRegistrationCallback | | JackPortRegistrationCallback | |
| registration_callback, void *arg)
JACK_OPTIONAL_WEAK_EXPORT; | | registration_callback, void *arg)
JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Tell the JACK server to call @a connect_callback whenever a | | * Tell the JACK server to call @a connect_callback whenever a | |
| * port is connected or disconnected, passing @a arg as a parameter. | | * port is connected or disconnected, passing @a arg as a parameter. | |
| * | | * | |
| * All "notification events" are received in a seperated non RT thread, | | * All "notification events" are received in a seperated non RT thread, | |
| * the code in the supplied function does not need to be | | * the code in the supplied function does not need to be | |
| * suitable for real-time execution. | | * suitable for real-time execution. | |
| * | | * | |
| * NOTE: this function cannot be called while the client is activated | | * NOTE: this function cannot be called while the client is activated | |
| * (after jack_activate has been called.) | | * (after jack_activate has been called.) | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_set_port_connect_callback (jack_client_t *, | | int jack_set_port_connect_callback (jack_client_t *client, | |
| JackPortConnectCallback | | JackPortConnectCallback | |
| connect_callback, void *arg) JACK_OPTIO
NAL_WEAK_EXPORT; | | connect_callback, void *arg) JACK_OPTIO
NAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Tell the JACK server to call @a rename_callback whenever a | | * Tell the JACK server to call @a rename_callback whenever a | |
| * port is renamed, passing @a arg as a parameter. | | * port is renamed, passing @a arg as a parameter. | |
| * | | * | |
| * All "notification events" are received in a seperated non RT thread, | | * All "notification events" are received in a seperated non RT thread, | |
| * the code in the supplied function does not need to be | | * the code in the supplied function does not need to be | |
| * suitable for real-time execution. | | * suitable for real-time execution. | |
| * | | * | |
| * NOTE: this function cannot be called while the client is activated | | * NOTE: this function cannot be called while the client is activated | |
| * (after jack_activate has been called.) | | * (after jack_activate has been called.) | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_set_port_rename_callback (jack_client_t *, | | int jack_set_port_rename_callback (jack_client_t *client, | |
| JackPortRenameCallback | | JackPortRenameCallback | |
| rename_callback, void *arg) JACK_OPTIONA
L_WEAK_EXPORT; | | rename_callback, void *arg) JACK_OPTIONA
L_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Tell the JACK server to call @a graph_callback whenever the | | * Tell the JACK server to call @a graph_callback whenever the | |
| * processing graph is reordered, passing @a arg as a parameter. | | * processing graph is reordered, passing @a arg as a parameter. | |
| * | | * | |
| * All "notification events" are received in a seperated non RT thread, | | * All "notification events" are received in a seperated non RT thread, | |
| * the code in the supplied function does not need to be | | * the code in the supplied function does not need to be | |
| * suitable for real-time execution. | | * suitable for real-time execution. | |
| * | | * | |
| * NOTE: this function cannot be called while the client is activated | | * NOTE: this function cannot be called while the client is activated | |
| * (after jack_activate has been called.) | | * (after jack_activate has been called.) | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_set_graph_order_callback (jack_client_t *, | | int jack_set_graph_order_callback (jack_client_t *client, | |
| JackGraphOrderCallback graph_callback, | | JackGraphOrderCallback graph_callback, | |
| void *) JACK_OPTIONAL_WEAK_EXPORT; | | void *) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Tell the JACK server to call @a xrun_callback whenever there is a | | * Tell the JACK server to call @a xrun_callback whenever there is a | |
| * xrun, passing @a arg as a parameter. | | * xrun, passing @a arg as a parameter. | |
| * | | * | |
| * All "notification events" are received in a seperated non RT thread, | | * All "notification events" are received in a seperated non RT thread, | |
| * the code in the supplied function does not need to be | | * the code in the supplied function does not need to be | |
| * suitable for real-time execution. | | * suitable for real-time execution. | |
| * | | * | |
| * NOTE: this function cannot be called while the client is activated | | * NOTE: this function cannot be called while the client is activated | |
| * (after jack_activate has been called.) | | * (after jack_activate has been called.) | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_set_xrun_callback (jack_client_t *, | | int jack_set_xrun_callback (jack_client_t *client, | |
| JackXRunCallback xrun_callback, void *arg) JACK
_OPTIONAL_WEAK_EXPORT; | | JackXRunCallback xrun_callback, void *arg) JACK
_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /*@}*/ | | /*@}*/ | |
| | | | |
| /** | | /** | |
| * Tell the Jack server to call @a latency_callback whenever it | | * Tell the Jack server to call @a latency_callback whenever it | |
| * is necessary to recompute the latencies for some or all | | * is necessary to recompute the latencies for some or all | |
| * Jack ports. | | * Jack ports. | |
| * | | * | |
| * @a latency_callback will be called twice each time it is | | * @a latency_callback will be called twice each time it is | |
| | | | |
| skipping to change at line 578 | | skipping to change at line 583 | |
| * Clients that do not meet any of those conditions SHOULD | | * Clients that do not meet any of those conditions SHOULD | |
| * register a latency callback. | | * register a latency callback. | |
| * | | * | |
| * See the documentation for @ref jack_port_set_latency_range() | | * See the documentation for @ref jack_port_set_latency_range() | |
| * on how the callback should operate. Remember that the @a mode | | * on how the callback should operate. Remember that the @a mode | |
| * argument given to the latency callback will need to be | | * argument given to the latency callback will need to be | |
| * passed into @ref jack_port_set_latency_range() | | * passed into @ref jack_port_set_latency_range() | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_set_latency_callback (jack_client_t *, | | int jack_set_latency_callback (jack_client_t *client, | |
| JackLatencyCallback latency_callback, | | JackLatencyCallback latency_callback, | |
| void *) JACK_WEAK_EXPORT; | | void *) JACK_WEAK_EXPORT; | |
| /*@}*/ | | /*@}*/ | |
| | | | |
| /** | | /** | |
| * @defgroup ServerClientControl Controlling & querying JACK server operati
on | | * @defgroup ServerClientControl Controlling & querying JACK server operati
on | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 716 | | skipping to change at line 721 | |
| const char *port_type, | | const char *port_type, | |
| unsigned long flags, | | unsigned long flags, | |
| unsigned long buffer_size) JACK_OPTIONAL_
WEAK_EXPORT; | | unsigned long buffer_size) JACK_OPTIONAL_
WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Remove the port from the client, disconnecting any existing | | * Remove the port from the client, disconnecting any existing | |
| * connections. | | * connections. | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_port_unregister (jack_client_t *, jack_port_t *) JACK_OPTIONAL_WEA
K_EXPORT; | | int jack_port_unregister (jack_client_t *client, jack_port_t *port) JACK_OP
TIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * This returns a pointer to the memory area associated with the | | * This returns a pointer to the memory area associated with the | |
| * specified port. For an output port, it will be a memory area | | * specified port. For an output port, it will be a memory area | |
| * that can be written to; for an input port, it will be an area | | * that can be written to; for an input port, it will be an area | |
| * containing the data from the port's connection(s), or | | * containing the data from the port's connection(s), or | |
| * zero-filled. if there are multiple inbound connections, the data | | * zero-filled. if there are multiple inbound connections, the data | |
| * will be mixed appropriately. | | * will be mixed appropriately. | |
| * | | * | |
| * FOR OUTPUT PORTS ONLY : DEPRECATED in Jack 2.0 !! | | * FOR OUTPUT PORTS ONLY : DEPRECATED in Jack 2.0 !! | |
| * --------------------------------------------------- | | * --------------------------------------------------- | |
| * You may cache the value returned, but only between calls to | | * You may cache the value returned, but only between calls to | |
| * your "blocksize" callback. For this reason alone, you should | | * your "blocksize" callback. For this reason alone, you should | |
| * either never cache the return value or ensure you have | | * either never cache the return value or ensure you have | |
| * a "blocksize" callback and be sure to invalidate the cached | | * a "blocksize" callback and be sure to invalidate the cached | |
| * address from there. | | * address from there. | |
| * | | * | |
| * Caching output ports is DEPRECATED in Jack 2.0, due to some new optimiza
tion (like "pipelining"). | | * Caching output ports is DEPRECATED in Jack 2.0, due to some new optimiza
tion (like "pipelining"). | |
| * Port buffers have to be retrieved in each callback for proper functionni
ng. | | * Port buffers have to be retrieved in each callback for proper functionni
ng. | |
| */ | | */ | |
|
| void * jack_port_get_buffer (jack_port_t *, jack_nframes_t) JACK_OPTIONAL_W
EAK_EXPORT; | | void * jack_port_get_buffer (jack_port_t *port, jack_nframes_t) JACK_OPTION
AL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return the full name of the jack_port_t (including the @a | | * @return the full name of the jack_port_t (including the @a | |
| * "client_name:" prefix). | | * "client_name:" prefix). | |
| * | | * | |
| * @see jack_port_name_size(). | | * @see jack_port_name_size(). | |
| */ | | */ | |
| const char * jack_port_name (const jack_port_t *port) JACK_OPTIONAL_WEAK_EX
PORT; | | const char * jack_port_name (const jack_port_t *port) JACK_OPTIONAL_WEAK_EX
PORT; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 774 | | skipping to change at line 779 | |
| const char * jack_port_type (const jack_port_t *port) JACK_OPTIONAL_WEAK_EX
PORT; | | const char * jack_port_type (const jack_port_t *port) JACK_OPTIONAL_WEAK_EX
PORT; | |
| | | | |
| /** | | /** | |
| * @return the @a port type id. | | * @return the @a port type id. | |
| */ | | */ | |
| jack_port_type_id_t jack_port_type_id (const jack_port_t *port) JACK_OPTION
AL_WEAK_EXPORT; | | jack_port_type_id_t jack_port_type_id (const jack_port_t *port) JACK_OPTION
AL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return TRUE if the jack_port_t belongs to the jack_client_t. | | * @return TRUE if the jack_port_t belongs to the jack_client_t. | |
| */ | | */ | |
|
| int jack_port_is_mine (const jack_client_t *, const jack_port_t *port) JACK
_OPTIONAL_WEAK_EXPORT; | | int jack_port_is_mine (const jack_client_t *client, const jack_port_t *port
) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return number of connections to or from @a port. | | * @return number of connections to or from @a port. | |
| * | | * | |
| * @pre The calling client must own @a port. | | * @pre The calling client must own @a port. | |
| */ | | */ | |
| int jack_port_connected (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT
; | | int jack_port_connected (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT
; | |
| | | | |
| /** | | /** | |
| * @return TRUE if the locally-owned @a port is @b directly connected | | * @return TRUE if the locally-owned @a port is @b directly connected | |
| | | | |
| skipping to change at line 796 | | skipping to change at line 801 | |
| * | | * | |
| * @see jack_port_name_size() | | * @see jack_port_name_size() | |
| */ | | */ | |
| int jack_port_connected_to (const jack_port_t *port, | | int jack_port_connected_to (const jack_port_t *port, | |
| const char *port_name) JACK_OPTIONAL_WEAK_EXPOR
T; | | const char *port_name) JACK_OPTIONAL_WEAK_EXPOR
T; | |
| | | | |
| /** | | /** | |
| * @return a null-terminated array of full port names to which the @a | | * @return a null-terminated array of full port names to which the @a | |
| * port is connected. If none, returns NULL. | | * port is connected. If none, returns NULL. | |
| * | | * | |
|
| * The caller is responsible for calling jack_free(3) on any non-NULL | | * The caller is responsible for calling jack_free() on any non-NULL | |
| * returned value. | | * returned value. | |
| * | | * | |
| * @param port locally owned jack_port_t pointer. | | * @param port locally owned jack_port_t pointer. | |
| * | | * | |
| * @see jack_port_name_size(), jack_port_get_all_connections() | | * @see jack_port_name_size(), jack_port_get_all_connections() | |
| */ | | */ | |
| const char ** jack_port_get_connections (const jack_port_t *port) JACK_OPTI
ONAL_WEAK_EXPORT; | | const char ** jack_port_get_connections (const jack_port_t *port) JACK_OPTI
ONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return a null-terminated array of full port names to which the @a | | * @return a null-terminated array of full port names to which the @a | |
| * port is connected. If none, returns NULL. | | * port is connected. If none, returns NULL. | |
| * | | * | |
|
| * The caller is responsible for calling jack_free(3) on any non-NULL | | * The caller is responsible for calling jack_free() on any non-NULL | |
| * returned value. | | * returned value. | |
| * | | * | |
| * This differs from jack_port_get_connections() in two important | | * This differs from jack_port_get_connections() in two important | |
| * respects: | | * respects: | |
| * | | * | |
| * 1) You may not call this function from code that is | | * 1) You may not call this function from code that is | |
| * executed in response to a JACK event. For example, | | * executed in response to a JACK event. For example, | |
| * you cannot use it in a GraphReordered handler. | | * you cannot use it in a GraphReordered handler. | |
| * | | * | |
| * 2) You need not be the owner of the port to get information | | * 2) You need not be the owner of the port to get information | |
| | | | |
| skipping to change at line 934 | | skipping to change at line 939 | |
| * | | * | |
| * @pre The @ref JackPortFlags of the @a source_port must include @ref | | * @pre The @ref JackPortFlags of the @a source_port must include @ref | |
| * JackPortIsOutput. | | * JackPortIsOutput. | |
| * | | * | |
| * @pre The @ref JackPortFlags of the @a destination_port must include | | * @pre The @ref JackPortFlags of the @a destination_port must include | |
| * @ref JackPortIsInput. | | * @ref JackPortIsInput. | |
| * | | * | |
| * @return 0 on success, EEXIST if the connection is already made, | | * @return 0 on success, EEXIST if the connection is already made, | |
| * otherwise a non-zero error code | | * otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_connect (jack_client_t *, | | int jack_connect (jack_client_t *client, | |
| const char *source_port, | | const char *source_port, | |
| const char *destination_port) JACK_OPTIONAL_WEAK_EXPORT; | | const char *destination_port) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Remove a connection between two ports. | | * Remove a connection between two ports. | |
| * | | * | |
| * @pre The port types must be identical. | | * @pre The port types must be identical. | |
| * | | * | |
| * @pre The @ref JackPortFlags of the @a source_port must include @ref | | * @pre The @ref JackPortFlags of the @a source_port must include @ref | |
| * JackPortIsOutput. | | * JackPortIsOutput. | |
| * | | * | |
| * @pre The @ref JackPortFlags of the @a destination_port must include | | * @pre The @ref JackPortFlags of the @a destination_port must include | |
| * @ref JackPortIsInput. | | * @ref JackPortIsInput. | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
|
| int jack_disconnect (jack_client_t *, | | int jack_disconnect (jack_client_t *client, | |
| const char *source_port, | | const char *source_port, | |
| const char *destination_port) JACK_OPTIONAL_WEAK_EXPOR
T; | | const char *destination_port) JACK_OPTIONAL_WEAK_EXPOR
T; | |
| | | | |
| /** | | /** | |
| * Perform the same function as jack_disconnect() using port handles | | * Perform the same function as jack_disconnect() using port handles | |
| * rather than names. This avoids the name lookup inherent in the | | * rather than names. This avoids the name lookup inherent in the | |
| * name-based version. | | * name-based version. | |
| * | | * | |
| * Clients connecting their own ports are likely to use this function, | | * Clients connecting their own ports are likely to use this function, | |
| * while generic connection clients (e.g. patchbays) would use | | * while generic connection clients (e.g. patchbays) would use | |
| * jack_disconnect(). | | * jack_disconnect(). | |
| */ | | */ | |
|
| int jack_port_disconnect (jack_client_t *, jack_port_t *) JACK_OPTIONAL_WEA
K_EXPORT; | | int jack_port_disconnect (jack_client_t *client, jack_port_t *port) JACK_OP
TIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return the maximum number of characters in a full JACK port name | | * @return the maximum number of characters in a full JACK port name | |
| * including the final NULL character. This value is a constant. | | * including the final NULL character. This value is a constant. | |
| * | | * | |
| * A port's full name contains the owning client name concatenated | | * A port's full name contains the owning client name concatenated | |
| * with a colon (:) followed by its short name and a NULL | | * with a colon (:) followed by its short name and a NULL | |
| * character. | | * character. | |
| */ | | */ | |
| int jack_port_name_size(void) JACK_OPTIONAL_WEAK_EXPORT; | | int jack_port_name_size(void) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| skipping to change at line 1055 | | skipping to change at line 1060 | |
| * physical hardware controlled by the client. For example, | | * physical hardware controlled by the client. For example, | |
| * for a client controlling a digital audio interface connected | | * for a client controlling a digital audio interface connected | |
| * to an external digital converter, the latency setting should | | * to an external digital converter, the latency setting should | |
| * include both buffering by the audio interface *and* the converter. | | * include both buffering by the audio interface *and* the converter. | |
| * | | * | |
| * @deprecated This method will be removed in the next major | | * @deprecated This method will be removed in the next major | |
| * release of JACK. It should not be used in new code, and should | | * release of JACK. It should not be used in new code, and should | |
| * be replaced by a latency callback that calls @ref | | * be replaced by a latency callback that calls @ref | |
| * jack_port_set_latency_range(). | | * jack_port_set_latency_range(). | |
| */ | | */ | |
|
| void jack_port_set_latency (jack_port_t *, jack_nframes_t) JACK_OPTIONAL_WE
AK_DEPRECATED_EXPORT; | | void jack_port_set_latency (jack_port_t *port, jack_nframes_t) JACK_OPTIONA
L_WEAK_DEPRECATED_EXPORT; | |
| | | | |
| /** | | /** | |
| * return the latency range defined by @a mode for | | * return the latency range defined by @a mode for | |
| * @a port, in frames. | | * @a port, in frames. | |
| * | | * | |
| * See @ref LatencyFunctions for the definition of each latency value. | | * See @ref LatencyFunctions for the definition of each latency value. | |
| * | | * | |
| * This is normally used in the LatencyCallback. | | * This is normally used in the LatencyCallback. | |
| * and therefor safe to execute from callbacks. | | * and therefor safe to execute from callbacks. | |
| */ | | */ | |
| | | | |
| skipping to change at line 1150 | | skipping to change at line 1155 | |
| * latency of its port using jack_port_set_latency | | * latency of its port using jack_port_set_latency | |
| * and wants to ensure that all signal pathways in the graph | | * and wants to ensure that all signal pathways in the graph | |
| * are updated with respect to the values that will be returned | | * are updated with respect to the values that will be returned | |
| * by jack_port_get_total_latency. It allows a client | | * by jack_port_get_total_latency. It allows a client | |
| * to change multiple port latencies without triggering a | | * to change multiple port latencies without triggering a | |
| * recompute for each change. | | * recompute for each change. | |
| * | | * | |
| * @return zero for successful execution of the request. non-zero | | * @return zero for successful execution of the request. non-zero | |
| * otherwise. | | * otherwise. | |
| */ | | */ | |
|
| int jack_recompute_total_latencies (jack_client_t*) JACK_OPTIONAL_WEAK_EXPO
RT; | | int jack_recompute_total_latencies (jack_client_t *client) JACK_OPTIONAL_WE
AK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return the time (in frames) between data being available or | | * @return the time (in frames) between data being available or | |
| * delivered at/to a port, and the time at which it arrived at or is | | * delivered at/to a port, and the time at which it arrived at or is | |
| * delivered to the "other side" of the port. E.g. for a physical | | * delivered to the "other side" of the port. E.g. for a physical | |
| * audio output port, this is the time between writing to the port and | | * audio output port, this is the time between writing to the port and | |
| * when the signal will leave the connector. For a physical audio | | * when the signal will leave the connector. For a physical audio | |
| * input port, this is the time between the sound arriving at the | | * input port, this is the time between the sound arriving at the | |
| * connector and the corresponding frames being readable from the | | * connector and the corresponding frames being readable from the | |
| * port. | | * port. | |
| | | | |
| skipping to change at line 1179 | | skipping to change at line 1184 | |
| /** | | /** | |
| * The maximum of the sum of the latencies in every | | * The maximum of the sum of the latencies in every | |
| * connection path that can be drawn between the port and other | | * connection path that can be drawn between the port and other | |
| * ports with the @ref JackPortIsTerminal flag set. | | * ports with the @ref JackPortIsTerminal flag set. | |
| * | | * | |
| * @deprecated This method will be removed in the next major | | * @deprecated This method will be removed in the next major | |
| * release of JACK. It should not be used in new code, and should | | * release of JACK. It should not be used in new code, and should | |
| * be replaced by jack_port_get_latency_range() in any existing | | * be replaced by jack_port_get_latency_range() in any existing | |
| * use cases. | | * use cases. | |
| */ | | */ | |
|
| jack_nframes_t jack_port_get_total_latency (jack_client_t *, | | jack_nframes_t jack_port_get_total_latency (jack_client_t *client, | |
| jack_port_t *port) JACK_OPTIONAL
_WEAK_DEPRECATED_EXPORT; | | jack_port_t *port) JACK_OPTIONAL
_WEAK_DEPRECATED_EXPORT; | |
| | | | |
| /** | | /** | |
| * Request a complete recomputation of a port's total latency. This | | * Request a complete recomputation of a port's total latency. This | |
| * can be called by a client that has just changed the internal | | * can be called by a client that has just changed the internal | |
| * latency of its port using jack_port_set_latency | | * latency of its port using jack_port_set_latency | |
| * and wants to ensure that all signal pathways in the graph | | * and wants to ensure that all signal pathways in the graph | |
| * are updated with respect to the values that will be returned | | * are updated with respect to the values that will be returned | |
| * by jack_port_get_total_latency. | | * by jack_port_get_total_latency. | |
| * | | * | |
| | | | |
| skipping to change at line 1218 | | skipping to change at line 1223 | |
| * @param port_name_pattern A regular expression used to select | | * @param port_name_pattern A regular expression used to select | |
| * ports by name. If NULL or of zero length, no selection based | | * ports by name. If NULL or of zero length, no selection based | |
| * on name will be carried out. | | * on name will be carried out. | |
| * @param type_name_pattern A regular expression used to select | | * @param type_name_pattern A regular expression used to select | |
| * ports by type. If NULL or of zero length, no selection based | | * ports by type. If NULL or of zero length, no selection based | |
| * on type will be carried out. | | * on type will be carried out. | |
| * @param flags A value used to select ports by their flags. | | * @param flags A value used to select ports by their flags. | |
| * If zero, no selection based on flags will be carried out. | | * If zero, no selection based on flags will be carried out. | |
| * | | * | |
| * @return a NULL-terminated array of ports that match the specified | | * @return a NULL-terminated array of ports that match the specified | |
|
| * arguments. The caller is responsible for calling jack_free(3) any | | * arguments. The caller is responsible for calling jack_free() any | |
| * non-NULL returned value. | | * non-NULL returned value. | |
| * | | * | |
| * @see jack_port_name_size(), jack_port_type_size() | | * @see jack_port_name_size(), jack_port_type_size() | |
| */ | | */ | |
|
| const char ** jack_get_ports (jack_client_t *, | | const char ** jack_get_ports (jack_client_t *client, | |
| const char *port_name_pattern, | | const char *port_name_pattern, | |
| const char *type_name_pattern, | | const char *type_name_pattern, | |
| unsigned long flags) JACK_OPTIONAL_WEAK_EXPOR
T; | | unsigned long flags) JACK_OPTIONAL_WEAK_EXPOR
T; | |
| | | | |
| /** | | /** | |
| * @return address of the jack_port_t named @a port_name. | | * @return address of the jack_port_t named @a port_name. | |
| * | | * | |
| * @see jack_port_name_size() | | * @see jack_port_name_size() | |
| */ | | */ | |
|
| jack_port_t * jack_port_by_name (jack_client_t *, const char *port_name) JA
CK_OPTIONAL_WEAK_EXPORT; | | jack_port_t * jack_port_by_name (jack_client_t *client, const char *port_na
me) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return address of the jack_port_t of a @a port_id. | | * @return address of the jack_port_t of a @a port_id. | |
| */ | | */ | |
| jack_port_t * jack_port_by_id (jack_client_t *client, | | jack_port_t * jack_port_by_id (jack_client_t *client, | |
| jack_port_id_t port_id) JACK_OPTIONAL_WEAK_E
XPORT; | | jack_port_id_t port_id) JACK_OPTIONAL_WEAK_E
XPORT; | |
| | | | |
| /*@}*/ | | /*@}*/ | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 1283 | | skipping to change at line 1288 | |
| * when used during the process callback it always returns the same | | * when used during the process callback it always returns the same | |
| * value (until the next process callback, where it will return | | * value (until the next process callback, where it will return | |
| * that value + nframes, etc). The return value is guaranteed to be | | * that value + nframes, etc). The return value is guaranteed to be | |
| * monotonic and linear in this fashion unless an xrun occurs. | | * monotonic and linear in this fashion unless an xrun occurs. | |
| * If an xrun occurs, clients must check this value again, as time | | * If an xrun occurs, clients must check this value again, as time | |
| * may have advanced in a non-linear way (e.g. cycles may have been skipped
). | | * may have advanced in a non-linear way (e.g. cycles may have been skipped
). | |
| */ | | */ | |
| jack_nframes_t jack_last_frame_time (const jack_client_t *client) JACK_OPTI
ONAL_WEAK_EXPORT; | | jack_nframes_t jack_last_frame_time (const jack_client_t *client) JACK_OPTI
ONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
|
| | | * This function may only be used from the process callback. | |
| | | * It provides the internal cycle timing information as used by | |
| | | * most of the other time related functions. This allows the | |
| | | * caller to map between frame counts and microseconds with full | |
| | | * precision (i.e. without rounding frame times to integers), | |
| | | * and also provides e.g. the microseconds time of the start of | |
| | | * the current cycle directly (it has to be computed otherwise). | |
| | | * | |
| | | * If the return value is zero, the following information is | |
| | | * provided in the variables pointed to by the arguments: | |
| | | * | |
| | | * current_frames: the frame time counter at the start of the | |
| | | * current cycle, same as jack_last_frame_time(). | |
| | | * current_usecs: the microseconds time at the start of the | |
| | | * current cycle. | |
| | | * next_usecs: the microseconds time of the start of the next | |
| | | * next cycle as computed by the DLL. | |
| | | * period_usecs: the current best estimate of the period time in | |
| | | * microseconds. | |
| | | * | |
| | | * NOTES: | |
| | | * | |
| | | * Because of the types used, all the returned values except period_usecs | |
| | | * are unsigned. In computations mapping between frames and microseconds | |
| | | * *signed* differences are required. The easiest way is to compute those | |
| | | * separately and assign them to the appropriate signed variables, | |
| | | * int32_t for frames and int64_t for usecs. See the implementation of | |
| | | * jack_frames_to_time() and Jack_time_to_frames() for an example. | |
| | | * | |
| | | * Unless there was an xrun, skipped cycles, or the current cycle is the | |
| | | * first after freewheeling or starting Jack, the value of current_usecs | |
| | | * will always be the value of next_usecs of the previous cycle. | |
| | | * | |
| | | * The value of period_usecs will in general NOT be exactly equal to | |
| | | * the difference of next_usecs and current_usecs. This is because to | |
| | | * ensure stability of the DLL and continuity of the mapping, a fraction | |
| | | * of the loop error must be included in next_usecs. For an accurate | |
| | | * mapping between frames and microseconds, the difference of next_usecs | |
| | | * and current_usecs should be used, and not period_usecs. | |
| | | * | |
| | | * @return zero if OK, non-zero otherwise. | |
| | | */ | |
| | | int jack_get_cycle_times(const jack_client_t *client, | |
| | | jack_nframes_t *current_frames, | |
| | | jack_time_t *current_usecs, | |
| | | jack_time_t *next_usecs, | |
| | | float *period_usecs) JACK_OPTIONAL_WEAK_EX | |
| | | PORT; | |
| | | | |
| | | /** | |
| * @return the estimated time in microseconds of the specified frame time | | * @return the estimated time in microseconds of the specified frame time | |
| */ | | */ | |
| jack_time_t jack_frames_to_time(const jack_client_t *client, jack_nframes_t
) JACK_OPTIONAL_WEAK_EXPORT; | | jack_time_t jack_frames_to_time(const jack_client_t *client, jack_nframes_t
) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @return the estimated time in frames for the specified system time. | | * @return the estimated time in frames for the specified system time. | |
| */ | | */ | |
| jack_nframes_t jack_time_to_frames(const jack_client_t *client, jack_time_t
) JACK_OPTIONAL_WEAK_EXPORT; | | jack_nframes_t jack_time_to_frames(const jack_client_t *client, jack_time_t
) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 1349 | | skipping to change at line 1403 | |
| * | | * | |
| * The JACK library provides two built-in callbacks for this purpose: | | * The JACK library provides two built-in callbacks for this purpose: | |
| * default_jack_info_callback() and silent_jack_info_callback(). | | * default_jack_info_callback() and silent_jack_info_callback(). | |
| */ | | */ | |
| void jack_set_info_function (void (*func)(const char *)) JACK_OPTIONAL_WEAK
_EXPORT; | | void jack_set_info_function (void (*func)(const char *)) JACK_OPTIONAL_WEAK
_EXPORT; | |
| | | | |
| /*@}*/ | | /*@}*/ | |
| | | | |
| /** | | /** | |
| * The free function to be used on memory returned by jack_port_get_connect
ions, | | * The free function to be used on memory returned by jack_port_get_connect
ions, | |
|
| * jack_port_get_all_connections and jack_get_ports functions. | | * jack_port_get_all_connections, jack_get_ports and jack_get_internal_clie
nt_name functions. | |
| * This is MANDATORY on Windows when otherwise all nasty runtime version re
lated crashes can occur. | | * This is MANDATORY on Windows when otherwise all nasty runtime version re
lated crashes can occur. | |
| * Developers are strongly encouraged to use this function instead of the s
tandard "free" function in new code. | | * Developers are strongly encouraged to use this function instead of the s
tandard "free" function in new code. | |
| * | | * | |
| */ | | */ | |
| void jack_free(void* ptr) JACK_OPTIONAL_WEAK_EXPORT; | | void jack_free(void* ptr) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| | | | |
End of changes. 28 change blocks. |
| 29 lines changed or deleted | | 84 lines changed or added | |
|