JACK-AUDIO-CONNECTION-KIT: simple_client.c File Reference

JACK-AUDIO-CONNECTION-KIT 0.125.0

Functions | Variables
simple_client.c File Reference

This simple client demonstrates the most basic features of JACK as they would be used by many applications. More...

`#include <stdio.h>`
`#include <errno.h>`
`#include <unistd.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <jack/jack.h>`

## Functions
int | process (jack_nframes_t nframes, void *arg)
void | jack_shutdown (void *arg)
int | main (int argc, char *argv[])

## Variables
jack_port_t * | input_port
jack_port_t * | output_port
jack_client_t * | client

## Detailed Description

This simple client demonstrates the most basic features of JACK as they would be used by many applications.

## Function Documentation

## ◆ jack_shutdown()

void jack_shutdown | ( | void * | arg | ) |

JACK calls this shutdown_callback if the server ever shuts down or decides to disconnect the client.

Referenced by main().

## ◆ main()

int main | ( | int | argc,
|  | char * | argv[]
| ) |  |

References client, input_port, jack_activate(), jack_client_close(), jack_client_open(), jack_connect(), JACK_DEFAULT_AUDIO_TYPE, jack_get_client_name(), jack_get_ports(), jack_get_sample_rate(), jack_on_shutdown(), jack_port_name(), jack_port_register(), jack_set_process_callback(), jack_shutdown(), JackNameNotUnique, JackNullOption, JackPortIsInput, JackPortIsOutput, JackPortIsPhysical, JackServerFailed, JackServerStarted, output_port, and process().

## ◆ process()

int process | ( | jack_nframes_t | nframes,
|  | void * | arg
| ) |  |

The process callback for this JACK application is called in a special realtime thread once for each audio cycle.

This client does nothing more than copy data from its input port to its output port. It will exit when stopped by the user (e.g. using Ctrl-C on a unix-ish operating system)

References input_port, jack_port_get_buffer(), and output_port.

Referenced by main().

## Variable Documentation

## ◆ client

jack_client_t* client

Referenced by jack_initialize(), and main().

## ◆ input_port

jack_port_t* input_port

Referenced by main(), and process().

## ◆ output_port

jack_port_t* output_port

Referenced by main(), and process().