#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.
|
|
Attempts to become an external client of the Jack server.
|
|
Return the pthread ID of the thread running the JACK client side code. |
|
Establishes 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.
|
|
This returns the current CPU load estimated by JACK as a percentage. The load is computed by measuring the amount of time it took to execute all clients as a fraction of the total amount of time represented by the data that was processed. |
|
Tells the Jack server that the program should be removed from the processing graph. As a side effect, this will disconnect any and all ports belonging to the client, since inactive clients are not allowed to be connected to any other ports.
|
|
Removes a connection between two ports.
|
|
Old-style interface to become the timebase for the entire JACK subsystem.
|
|
Return an estimate of the current time in frames. It is a running counter - no significance should be attached to the return value. it should be used to compute the difference between a previously returned value. |
|
This estimates the time that has passed since the JACK server started calling the process callbacks of all its clients. |
|
This returns the current maximum size that will ever be passed to the process_callback. It should only be used *before* the client has been activated. This size may change, clients that depend on it must register a bufsize_callback so they will be notified if it does.
|
|
|
|
This returns the sample rate of the jack system, as set by the user when jackd was started. |
|
Removes an internal client from a JACK server.
|
|
|
|
|
|
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(). |
|
Searchs for and returns the jack_port_t of id 'id'. |
|
Searchs for and returns the jack_port_t with the name value from portname. |
|
Performs the exact same function as jack_connect(), but it uses port handles rather than names, which avoids the name lookup inherent in the name-based version. It is envisaged that clients connecting their own ports will use these two, whereas generic connection clients (e.g. patchbays) will use the name-based versions.
|
|
This returns a positive integer indicating the number of connections to or from 'port'. Ūpre The calling client must own 'port'. |
|
This returns TRUE or FALSE if the port argument is DIRECTLY connected to the port with the name given in 'portname'
|
|
Performs the exact same function as jack_disconnect(), but it uses port handles rather than names, which avoids the name lookup inherent in the name-based version. It is envisaged that clients disconnecting their own ports will use these two, whereas generic connection clients (e.g. patchbays) will use the name-based versions. |
|
If JackPortCanMonitor is set for a port, then this function will turn on input monitoring if it was off, and will turn it off it only one request has been made to turn it on. If JackPortCanMonitor is not set, then this function will do nothing.
|
|
Returns the flags of the jack_port_t. |
|
This returns a null-terminated array of port names to which the argument port is connected. if there are no connections, it returns NULL. The caller is responsible for calling free(3) on any non-NULL returned value. It 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. |
|
This returns a null-terminated array of port names to which the argument port is connected. if there are no connections, it returns NULL. The caller is responsible for calling free(3) on any non-NULL returned value.
|
|
Returns 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 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 when the signal will leave the connector. For a physical audio input port, this is the time between the sound arriving at the connector and the corresponding frames being readable from the port. |
|
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. |
|
Returns 1 if the jack_port_t belongs to the jack_client_t. |
|
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.
|
|
Returns a true or false value depending on whether or not input monitoring has been requested for 'port'. |
|
Returns the name of the jack_port_t. |
|
This creates a new port for the client. A port is an object used for moving data in or out of the client. the data may be of any type. Ports may be connected to each other in various ways. A port has a short name, a non-NULL and non-zero length string, and is passed as the first argument. A port's full name is the name of the client concatenated with a colon (:) and then its short name. There are limits to the length of the name, and exceeding them will cause registration of the port to fail and the function to return NULL. The limit is derived from the size of a full port name, which also has to include the client name and a separator character. A port has a type, which may be any non-NULL and non-zero length string, and is passed as the second argument. Some port types are built into the JACK API (currently only JACK_DEFAULT_AUDIO_TYPE). For other types, the client must supply a non-zero buffer_size. For builtin types, buffer_size is ignored. The flags argument is formed from a bitmask of JackPortFlags values.
|
|
If JackPortCanMonitor is set for a port, then these 2 functions will turn on/off input monitoring for the port. If JackPortCanMonitor is not set, then these functions will have no effect. |
|
If JackPortCanMonitor is set for a port, then these 2 functions will turn on/off input monitoring for the port. If JackPortCanMonitor is not set, then these functions will have no effect.
|
|
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. |
|
This modifies a port's name, and may be called at any time.
|
|
Returns the short name of the jack_port_t. |
|
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.
|
|
Returns the type of the jack_port_t. |
|
This allows other objects to change the connection status of a port.
|
|
This removes the port from the client, disconnecting any existing connections at the same time.
|
|
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.
|
|
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 'registration_callback' whenever the processing graph is reordered, passing 'arg' as an argument.
|
|
Tell the Jack server to call 'registration_callback' whenever a port is registered or unregistered, passing 'arg' as a second argument.
|
|
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.
|
|
Set the directory in which the server is expected to have put its communication FIFOs. A client will need to call this before calling jack_client_new() if the server was started with arguments telling it to use a non-standard directory.
|
|
Tell the Jack server to call 'xrun_callback' whenever there is a xrun, passing 'arg' as an argument.
|
|
Function called for displaying JACK error messages. Set via jack_set_error_function(), otherwise a JACK-provided default will print msg (plus a newline) to stderr.
|