#include <pthread.h>
#include <jack/types.h>
#include <jack/transport.h>
Go to the source code of this file.
|
Tell the Jack server that the program is ready to start processing audio.
|
|
Disconnects an external client from a JACK server.
|
|
|
|
Attempt to become an external client of the Jack server. JACK is evolving a mechanism for automatically starting the server when needed. As a transition, jack_client_new() only does this when $JACK_START_SERVER is defined in the environment of the calling process. In the future this will become normal behavior. For full control of this feature, use jack_client_open(), instead. In either case, defining $JACK_NO_START_SERVER disables this feature.
|
|
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.
|
|
|
|
Establish a connection between two ports. When a connection exists, data written to the source port will be available to be read at the destination port.
|
|
|
|
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.
|
|
Remove a connection between two ports.
|
|
Old-style interface to become the timebase for the entire JACK subsystem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove an internal client from a JACK server.
|
|
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.
|
|
|
|
|
|
NOTE: clients do not need to call this. It exists only to help more complex clients understand what is going on. It should be called before jack_client_activate(). |
|
|
|
|
|
|
|
|
|
Perform the same function as jack_disconnect() using port handles rather than names. This avoids the name lookup inherent in the name-based version. Clients connecting their own ports are likely to use this function, while generic connection clients (e.g. patchbays) would use jack_disconnect(). |
|
If JackPortCanMonitor is set for a port, this function turns on input monitoring if it was off, and turns it off if only one request has been made to turn it on. Otherwise it does nothing.
|
|
|
|
This differs from jack_port_get_connections() in two important respects: 1) You may not call this function from code that is executed in response to a JACK event. For example, you cannot use it in a GraphReordered handler. 2) You need not be the owner of the port to get information about its connections.
|
|
This returns a pointer to the memory area associated with the 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 containing the data from the port's connection(s), or zero-filled. if there are multiple inbound connections, the data will be mixed appropriately. FOR OUTPUT PORTS ONLY --------------------- You may cache the value returned, but only between calls to your "blocksize" callback. For this reason alone, you should either never cache the return value or ensure you have a "blocksize" callback and be sure to invalidate the cached address from there. |
|
|
|
|
|
The maximum of the sum of the latencies in every connection path that can be drawn between the port and other ports with the JackPortIsTerminal flag set. |
|
|
|
A client may call this function to prevent other objects from changing the connection status of a port. The port must be owned by the calling client.
|
|
|
|
|
|
|
|
Create a new port for the client. This is an object used for moving data of any type in or out of the client. Ports may be connected in various ways. Each port has a short name. The port's full name contains the name of the client concatenated with a colon (:) followed by its short name. The jack_port_name_size() is the maximum length of this full name. Exceeding that will cause the port registration to fail and return NULL. All ports have a type, which may be any non-NULL and non-zero length string, passed as an argument. Some port types are built into the JACK API, currently only JACK_DEFAULT_AUDIO_TYPE.
|
|
If JackPortCanMonitor is set for this port, turn input monitoring on or off. Otherwise, do nothing. |
|
If JackPortCanMonitor is set for this port_name, turn input monitoring on or off. Otherwise, do nothing.
|
|
The port latency is zero by default. Clients that control physical hardware with non-zero latency should call this to set the latency to its correct value. Note that the value should include any systemic latency present "outside" the physical hardware controlled by the client. For example, for a client controlling a digital audio interface connected to an external digital converter, the latency setting should include both buffering by the audio interface *and* the converter. |
|
Modify a port's short name. May be called at any time. If the resulting full name (including the "client_name:" prefix) is longer than jack_port_name_size(), it will be truncated.
|
|
|
|
A client may call this on a pair of its own ports to semi-permanently wire them together. This means that a client that wants to direct-wire an input port to an output port can call this and then no longer have to worry about moving data between them. Any data arriving at the input port will appear automatically at the output port. The 'destination' port must be an output port. The 'source' port must be an input port. Both ports must belong to the same client. You cannot use this to tie ports between clients. That is what a connection is for.
|
|
|
|
|
|
This allows other objects to change the connection status of a port.
|
|
Remove the port from the client, disconnecting any existing connections.
|
|
This undoes the effect of jack_port_tie(). The port should be same as the 'destination' port passed to jack_port_tie().
|
|
|
|
Change the buffer size passed to the process_callback. This operation stops the JACK engine process cycle, then calls all registered bufsize_callback functions before restarting the process cycle. This will cause a gap in the audio flow, so it should only be done at appropriate stopping points.
|
|
Tell JACK to call bufsize_callback whenever the size of the the buffer that will be passed to the process_callback is about to change. Clients that depend on knowing the buffer size must supply a bufsize_callback before activating themselves.
|
|
Set the jack_error_callback for error message display. The JACK library provides two built-in callbacks for this purpose: default_jack_error_callback() and silent_jack_error_callback(). |
|
Start/Stop JACK's "freewheel" mode. When in "freewheel" mode, JACK no longer waits for any external event to begin the start of the next process cycle. As a result, freewheel mode causes "faster than realtime" execution of a JACK graph. If possessed, real-time scheduling is dropped when entering freewheel mode, and if appropriate it is reacquired when stopping. IMPORTANT: on systems using capabilities to provide real-time scheduling (i.e. Linux kernel 2.4), if onoff is zero, this function must be called from the thread that originally called jack_activate(). This restriction does not apply to other systems (e.g. Linux kernel 2.6 or OS X).
|
|
Tell the Jack server to call freewheel_callback whenever we enter or leave "freewheel" mode, passing arg as the second argument. The first argument to the callback will be non-zero if JACK is entering freewheel mode, and zero otherwise.
|
|
Tell the JACK server to call graph_callback whenever the processing graph is reordered, passing arg as a parameter.
|
|
Tell the JACK server to call registration_callback whenever a port is registered or unregistered, passing arg as a parameter.
|
|
Tell the Jack server to call process_callback whenever there is work be done, passing arg as the second argument. The code in the supplied function must be suitable for real-time execution. That means that it cannot call functions that might block for a long time. This includes malloc, free, printf, pthread_mutex_lock, sleep, wait, poll, select, pthread_join, pthread_cond_wait, etc, etc. See http://jackit.sourceforge.net/docs/design/design.html#SECTION00411000000000000000 for more information.
|
|
Tell the Jack server to call srate_callback whenever the system sample rate changes.
|
|
Tell JACK to call thread_init_callback once just after the creation of the thread in which all other callbacks will be handled. The code in the supplied function does not need to be suitable for real-time execution.
|
|
Tell the JACK server to call xrun_callback whenever there is a xrun, passing arg as a parameter.
|
|
Display JACK error message. Set via jack_set_error_function(), otherwise a JACK-provided default will print msg (plus a newline) to stderr.
|