jack.c.jack

Undocumented in source.

Public Imports

jack.c.systemdeps
public import jack.c.systemdeps;
Undocumented in source.
jack.c.types
public import jack.c.types;
Undocumented in source.
jack.c.transport
public import jack.c.transport;
Undocumented in source.

Members

Functions

jack_activate
int jack_activate(jack_client_t* client)

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

jack_client_close
int jack_client_close(jack_client_t* client)

Disconnects an external client from a JACK server.

jack_client_name_size
int jack_client_name_size()

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

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

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

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.

jack_client_thread_id
jack_native_thread_t jack_client_thread_id(jack_client_t* client)

@return the pthread ID of the thread running the JACK client side real-time code.

jack_connect
int jack_connect(jack_client_t* client, const(char)* source_port, const(char)* destination_port)

Establish a connection between two ports.

jack_cpu_load
float jack_cpu_load(jack_client_t* client)

@return the current CPU load estimated by JACK. This is a running average of the time it takes to execute a full process cycle for all clients as a percentage of the real time available per cycle determined by the buffer size and sample rate.

jack_cycle_signal
void jack_cycle_signal(jack_client_t* client, int status)

Signal next clients in the graph.

jack_cycle_wait
jack_nframes_t jack_cycle_wait(jack_client_t* client)

Wait until this JACK client should process data.

jack_deactivate
int jack_deactivate(jack_client_t* client)

Tell the Jack server to remove this @a client from the process graph. Also, disconnect all ports belonging to it, since inactive clients have no port connections.

jack_disconnect
int jack_disconnect(jack_client_t* client, const(char)* source_port, const(char)* destination_port)

Remove a connection between two ports.

jack_engine_takeover_timebase
deprecated int jack_engine_takeover_timebase(jack_client_t* )

Old-style interface to become the timebase for the entire JACK subsystem.

jack_frame_time
jack_nframes_t jack_frame_time(const(jack_client_t)* )

@return the estimated current time in frames. This function is intended for use in other threads (not the process callback). The return value can be compared with the value of jack_last_frame_time to relate time in other threads to JACK time.

jack_frames_since_cycle_start
jack_nframes_t jack_frames_since_cycle_start(const(jack_client_t)* )

@return the estimated time in frames that has passed since the JACK server began the current process cycle.

jack_frames_to_time
jack_time_t jack_frames_to_time(const(jack_client_t)* client, jack_nframes_t )

@return the estimated time in microseconds of the specified frame time

jack_free
void jack_free(void* ptr)

The free function to be used on memory returned by jack_port_get_connections, jack_port_get_all_connections, jack_get_ports and jack_get_internal_client_name functions. This is MANDATORY on Windows when otherwise all nasty runtime version related crashes can occur. Developers are strongly encouraged to use this function instead of the standard "free" function in new code.

jack_get_buffer_size
jack_nframes_t jack_get_buffer_size(jack_client_t* )

@return the current maximum size that will ever be passed to the @a 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 @a bufsize_callback so they will be notified if it does.

jack_get_client_name
char* jack_get_client_name(jack_client_t* client)

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

jack_get_client_pid
int jack_get_client_pid(const(char)* name)

@return pid of client. If not available, 0 will be returned.

jack_get_cycle_times
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)

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).

jack_get_ports
const(char)** jack_get_ports(jack_client_t* client, const(char)* port_name_pattern, const(char)* type_name_pattern, c_ulong flags)

@param port_name_pattern A regular expression used to select ports by name. If NULL or of zero length, no selection based on name will be carried out. @param type_name_pattern A regular expression used to select ports by type. If NULL or of zero length, no selection based on type will be carried out. @param flags A value used to select ports by their flags. If zero, no selection based on flags will be carried out.

jack_get_sample_rate
jack_nframes_t jack_get_sample_rate(jack_client_t* )

@return the sample rate of the jack system, as set by the user when jackd was started.

jack_get_time
jack_time_t jack_get_time()

@return return JACK's current system time in microseconds, using the JACK clock source.

jack_get_version
void jack_get_version(int* major_ptr, int* minor_ptr, int* micro_ptr, int* proto_ptr)

Call this function to get version of the JACK, in form of several numbers

jack_get_version_string
const(char)* jack_get_version_string()

Call this function to get version of the JACK, in form of a string

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

Remove an internal client from a JACK server.

jack_internal_client_new
deprecated 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.

jack_is_realtime
int jack_is_realtime(jack_client_t* client)

@param client pointer to JACK client structure.

jack_last_frame_time
jack_nframes_t jack_last_frame_time(const(jack_client_t)* client)

@return the precise time at the start of the current process cycle. This function may only be used from the process callback, and can be used to interpret timestamps generated by jack_frame_time() in other threads with respect to the current process cycle.

jack_on_info_shutdown
void jack_on_info_shutdown(jack_client_t* client, JackInfoShutdownCallback shutdown_callback, void* arg)

@param client pointer to JACK client structure. @param function The jack_info_shutdown function pointer. @param arg The arguments for the jack_info_shutdown function.

jack_on_shutdown
void jack_on_shutdown(jack_client_t* client, JackShutdownCallback shutdown_callback, void* arg)

@param client pointer to JACK client structure. @param function The jack_shutdown function pointer. @param arg The arguments for the jack_shutdown function.

jack_port_by_id
jack_port_t* jack_port_by_id(jack_client_t* client, jack_port_id_t port_id)

@return address of the jack_port_t of a @a port_id.

jack_port_by_name
jack_port_t* jack_port_by_name(jack_client_t* client, const(char)* port_name)

@return address of the jack_port_t named @a port_name.

jack_port_connected
int jack_port_connected(const(jack_port_t)* port)

@return number of connections to or from @a port.

jack_port_connected_to
int jack_port_connected_to(const(jack_port_t)* port, const(char)* port_name)

@return TRUE if the locally-owned @a port is @b directly connected to the @a port_name.

jack_port_disconnect
int jack_port_disconnect(jack_client_t* client, jack_port_t* port)

Perform the same function as jack_disconnect() using port handles rather than names. This avoids the name lookup inherent in the name-based version.

jack_port_ensure_monitor
int jack_port_ensure_monitor(jack_port_t* port, int onoff)

If @ref 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.

jack_port_flags
int jack_port_flags(const(jack_port_t)* port)

@return the @ref JackPortFlags of the jack_port_t.

jack_port_get_aliases
int jack_port_get_aliases(const(jack_port_t)* port, const(char*)* aliases)

Get any aliases known for @port.

jack_port_get_all_connections
const(char)** jack_port_get_all_connections(const(jack_client_t)* client, const(jack_port_t)* port)

@return a null-terminated array of full port names to which the @a port is connected. If none, returns NULL.

jack_port_get_buffer
void* jack_port_get_buffer(jack_port_t* port, jack_nframes_t )

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.

jack_port_get_connections
const(char)** jack_port_get_connections(const(jack_port_t)* port)

@return a null-terminated array of full port names to which the @a port is connected. If none, returns NULL.

jack_port_get_latency
deprecated jack_nframes_t jack_port_get_latency(jack_port_t* port)

@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 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.

jack_port_get_latency_range
void jack_port_get_latency_range(jack_port_t* port, jack_latency_callback_mode_t mode, jack_latency_range_t* range)

return the latency range defined by @a mode for @a port, in frames.

jack_port_get_total_latency
deprecated jack_nframes_t jack_port_get_total_latency(jack_client_t* client, jack_port_t* 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 @ref JackPortIsTerminal flag set.

jack_port_is_mine
int jack_port_is_mine(const(jack_client_t)* client, const(jack_port_t)* port)

@return TRUE if the jack_port_t belongs to the jack_client_t.

jack_port_monitoring_input
int jack_port_monitoring_input(jack_port_t* port)

@return TRUE if input monitoring has been requested for @a port.

jack_port_name
const(char)* jack_port_name(const(jack_port_t)* port)

@return the full name of the jack_port_t (including the @a "client_name:" prefix).

jack_port_name_size
int jack_port_name_size()

@return the maximum number of characters in a full JACK port name including the final NULL character. This value is a constant.

jack_port_register
jack_port_t* jack_port_register(jack_client_t* client, const(char)* port_name, const(char)* port_type, c_ulong flags, c_ulong buffer_size)

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.

jack_port_request_monitor
int jack_port_request_monitor(jack_port_t* port, int onoff)

If @ref JackPortCanMonitor is set for this @a port, turn input monitoring on or off. Otherwise, do nothing.

jack_port_request_monitor_by_name
int jack_port_request_monitor_by_name(jack_client_t* client, const(char)* port_name, int onoff)

If @ref JackPortCanMonitor is set for this @a port_name, turn input monitoring on or off. Otherwise, do nothing.

jack_port_set_alias
int jack_port_set_alias(jack_port_t* port, const(char)* alia)

Set @a alias as an alias for @a port. May be called at any time. If the alias is longer than jack_port_name_size(), it will be truncated.

jack_port_set_latency
deprecated void jack_port_set_latency(jack_port_t* port, jack_nframes_t )

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.

jack_port_set_latency_range
void jack_port_set_latency_range(jack_port_t* port, jack_latency_callback_mode_t mode, jack_latency_range_t* range)

set the minimum and maximum latencies defined by @a mode for @a port, in frames.

jack_port_set_name
int jack_port_set_name(jack_port_t* port, const(char)* port_name)

Modify a port's short name. May be called at any time. If the resulting full name (including the @a "client_name:" prefix) is longer than jack_port_name_size(), it will be truncated.

jack_port_short_name
const(char)* jack_port_short_name(const(jack_port_t)* port)

@return the short name of the jack_port_t (not including the @a "client_name:" prefix).

jack_port_tie
deprecated int jack_port_tie(jack_port_t* src, jack_port_t* dst)

@deprecated This function will be removed from a future version of JACK. Do not use it. There is no replacement. It has turned out to serve essentially no purpose in real-life JACK clients.

jack_port_type
const(char)* jack_port_type(const(jack_port_t)* port)

@return the @a port type, at most jack_port_type_size() characters including a final NULL.

jack_port_type_get_buffer_size
size_t jack_port_type_get_buffer_size(jack_client_t* client, const(char)* port_type)

@return the buffersize of a port of type @arg port_type.

jack_port_type_id
jack_port_type_id_t jack_port_type_id(const(jack_port_t)* port)

@return the @a port type id.

jack_port_type_size
int jack_port_type_size()

@return the maximum number of characters in a JACK port type name including the final NULL character. This value is a constant.

jack_port_unregister
int jack_port_unregister(jack_client_t* client, jack_port_t* port)

Remove the port from the client, disconnecting any existing connections.

jack_port_unset_alias
int jack_port_unset_alias(jack_port_t* port, const(char)* alia)

Remove @a alias as an alias for @a port. May be called at any time.

jack_port_untie
deprecated int jack_port_untie(jack_port_t* port)

@deprecated This function will be removed from a future version of JACK. Do not use it. There is no replacement. It has turned out to serve essentially no purpose in real-life JACK clients.

jack_recompute_total_latencies
int jack_recompute_total_latencies(jack_client_t* client)

Request a complete recomputation of all port latencies. This can be called by a client that has just changed the internal latency of its port using jack_port_set_latency and wants to ensure that all signal pathways in the graph are updated with respect to the values that will be returned by jack_port_get_total_latency. It allows a client to change multiple port latencies without triggering a recompute for each change.

jack_recompute_total_latency
deprecated int jack_recompute_total_latency(jack_client_t* , jack_port_t* port)

Request a complete recomputation of a port's total latency. This can be called by a client that has just changed the internal latency of its port using jack_port_set_latency and wants to ensure that all signal pathways in the graph are updated with respect to the values that will be returned by jack_port_get_total_latency.

jack_set_buffer_size
int jack_set_buffer_size(jack_client_t* client, jack_nframes_t nframes)

Change the buffer size passed to the @a process_callback.

jack_set_buffer_size_callback
int jack_set_buffer_size_callback(jack_client_t* client, JackBufferSizeCallback bufsize_callback, void* arg)

Tell JACK to call @a bufsize_callback whenever the size of the the buffer that will be passed to the @a process_callback is about to change. Clients that depend on knowing the buffer size must supply a @a bufsize_callback before activating themselves.

jack_set_client_registration_callback
int jack_set_client_registration_callback(jack_client_t* client, JackClientRegistrationCallback registration_callback, void* arg)

Tell the JACK server to call @a client_registration_callback whenever a client is registered or unregistered, passing @a arg as a parameter.

jack_set_error_function
void jack_set_error_function(void function(const(char)*) )

Set the @ref jack_error_callback for error message display. Set it to NULL to restore default_jack_error_callback function.

jack_set_freewheel
int jack_set_freewheel(jack_client_t* client, int onoff)

Start/Stop JACK's "freewheel" mode.

jack_set_freewheel_callback
int jack_set_freewheel_callback(jack_client_t* client, JackFreewheelCallback freewheel_callback, void* arg)

Tell the Jack server to call @a freewheel_callback whenever we enter or leave "freewheel" mode, passing @a arg as the second argument. The first argument to the callback will be non-zero if JACK is entering freewheel mode, and zero otherwise.

jack_set_graph_order_callback
int jack_set_graph_order_callback(jack_client_t* client, JackGraphOrderCallback graph_callback, void* )

Tell the JACK server to call @a graph_callback whenever the processing graph is reordered, passing @a arg as a parameter.

jack_set_info_function
void jack_set_info_function(void function(const(char)*) )

Set the @ref jack_info_callback for info message display. Set it to NULL to restore default_jack_info_callback function.

jack_set_latency_callback
int jack_set_latency_callback(jack_client_t* client, JackLatencyCallback latency_callback, void* )

Tell the Jack server to call @a latency_callback whenever it is necessary to recompute the latencies for some or all Jack ports.

jack_set_port_connect_callback
int jack_set_port_connect_callback(jack_client_t* client, JackPortConnectCallback connect_callback, void* arg)

Tell the JACK server to call @a connect_callback whenever a port is connected or disconnected, passing @a arg as a parameter.

jack_set_port_registration_callback
int jack_set_port_registration_callback(jack_client_t* client, JackPortRegistrationCallback registration_callback, void* arg)

Tell the JACK server to call @a registration_callback whenever a port is registered or unregistered, passing @a arg as a parameter.

jack_set_port_rename_callback
int jack_set_port_rename_callback(jack_client_t* client, JackPortRenameCallback rename_callback, void* arg)

Tell the JACK server to call @a rename_callback whenever a port is renamed, passing @a arg as a parameter.

jack_set_process_callback
int jack_set_process_callback(jack_client_t* client, JackProcessCallback process_callback, void* arg)

Tell the Jack server to call @a process_callback whenever there is work be done, passing @a arg as the second argument.

jack_set_process_thread
int jack_set_process_thread(jack_client_t* client, JackThreadCallback thread_callback, void* arg)

* Tell the Jack server to call @a thread_callback in the RT thread. * Typical use are in conjunction with @a jack_cycle_wait and @a jack_cycle_signal functions. * 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. * * NOTE: this function cannot be called while the client is activated * (after jack_activate has been called.) * * @return 0 on success, otherwise a non-zero error code.

jack_set_sample_rate_callback
int jack_set_sample_rate_callback(jack_client_t* client, JackSampleRateCallback srate_callback, void* arg)

Tell the Jack server to call @a srate_callback whenever the system sample rate changes.

jack_set_thread_init_callback
int jack_set_thread_init_callback(jack_client_t* client, JackThreadInitCallback thread_init_callback, void* arg)

Tell JACK to call @a thread_init_callback once just after the creation of the thread in which all other callbacks will be handled.

jack_set_xrun_callback
int jack_set_xrun_callback(jack_client_t* client, JackXRunCallback xrun_callback, void* arg)

Tell the JACK server to call @a xrun_callback whenever there is a xrun, passing @a arg as a parameter.

jack_thread_wait
deprecated jack_nframes_t jack_thread_wait(jack_client_t* client, int status)

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

jack_time_to_frames
jack_nframes_t jack_time_to_frames(const(jack_client_t)* client, jack_time_t )

@return the estimated time in frames for the specified system time.

Variables

jack_error_callback
void function(const(char)* msg) jack_error_callback;

Display JACK error message.

jack_info_callback
void function(const(char)* msg) jack_info_callback;

Display JACK info message.

Meta