# inprocess.c File Reference

This demonstrates the basic concepts for writing a client that runs within the JACK server process. More...

`#include <stdlib.h>`
`#include <stdio.h>`
`#include <memory.h>`
`#include <jack/jack.h>`

## Data Structures
struct | port_pair_t
## Functions
int | inprocess (jack_nframes_t nframes, void *arg)
int | jack_initialize (jack_client_t *client, const char *load_init)
void | jack_finish (void *arg)

## Detailed Description

This demonstrates the basic concepts for writing a client that runs within the JACK server process.

For the sake of example, a port_pair_t is allocated in jack_initialize(), passed to inprocess() as an argument, then freed in jack_finish().

## Function Documentation

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

| Called in the realtime thread on every process cycle. The entry point name was passed to jack_set_process_callback() from jack_initialize(). Although this is an internal client, its process() interface is identical to simple_client.c. Returns: 0 if successful; otherwise jack_finish() will be called and the client terminated immediately.

void jack_finish | ( | void * | arg | ) |

  | This required entry point is called immediately before the client is unloaded, which could happen due to a call to jack_internal_client_unload(), or a nonzero return from either jack_initialize() or inprocess(). Parameters:
  | arg | the same parameter provided to inprocess().

int jack_initialize | ( | jack_client_t * | client,
|  | const char * | load_init
| ) |

  | This required entry point is called after the client is loaded by jack_internal_client_load(). Parameters:
  | client | pointer to JACK client structure.
  | load_init | character string passed to the load operation.
Returns: 0 if successful; otherwise jack_finish() will be called and the client terminated immediately.