Crudebyte Logo
JACKiOS  1.9.10.3
Controlling & querying JACK server operation

Detailed Description

The functions in this group allow to retrieve and control parameters which effect the whole JACK environment, so it effects all JACK clients as well. Typical usage is to modify the overall latency or sample rate of the system. JACK was designed to allow changing such fundamental parameters at any time without requiring the JACK server and its clients to be restarted completely. The latter requires though, that all active clients have registered the necessary callback functions involved, and react on such callback calls appropriately.

Functions

int jack_set_freewheel (jack_client_t *client, int onoff) JACK_OPTIONAL_WEAK_EXPORT
int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes) JACK_OPTIONAL_WEAK_EXPORT
jack_nframes_t jack_get_sample_rate (jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT
jack_nframes_t jack_get_buffer_size (jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT
int jack_engine_takeover_timebase (jack_client_t *) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
float jack_cpu_load (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
float jack_get_max_cpu_load (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT
float jack_set_max_cpu_load (jack_client_t *client, float max_cpu_load) JACK_OPTIONAL_WEAK_EXPORT

Function Documentation

int jack_set_freewheel ( jack_client_t client,
int  onoff 
)

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

Parameters
clientpointer to JACK client structure
onoffif non-zero, freewheel mode starts. Otherwise freewheel mode ends.
Returns
0 on success, otherwise a non-zero error code.
int jack_set_buffer_size ( jack_client_t client,
jack_nframes_t  nframes 
)

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.

See Also
jack_set_buffer_size_callback()
Parameters
clientpointer to JACK client structure.
nframesnew buffer size. Must be a power of two.
Returns
0 on success, otherwise a non-zero error code
jack_nframes_t jack_get_sample_rate ( jack_client_t )
Returns
the sample rate of the jack system, as set by the user when jackd was started.
jack_nframes_t jack_get_buffer_size ( jack_client_t )
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.
See Also
jack_set_buffer_size_callback()
int jack_engine_takeover_timebase ( jack_client_t )

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

Deprecated:
This function still exists for compatibility with the earlier transport interface, but it does nothing. Instead, see transport.h and use jack_set_timebase_callback().
Returns
ENOSYS, function not implemented.
float jack_cpu_load ( jack_client_t client)
Returns
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.
Parameters
clientpointer to JACK client structure.
float jack_get_max_cpu_load ( jack_client_t client)
Returns
the maximum DSP CPU load allowed before the server starts killing clients. By default the maximum allowed DSP CPU load is 100%.
Parameters
clientpointer to JACK client structure.
float jack_set_max_cpu_load ( jack_client_t client,
float  max_cpu_load 
)

Setup the maximum DSP CPU load allowed before the server starts killing clients.

Parameters
clientpointer to JACK client structure.
themaximum possible DSP CPU before the server starts killing clients.
DE • EN
Copyright © MMXIII Crudebyte. All rights reserved.

twitter