/** @file latent_client.c * * @brief This simple client demonstrates the most basic features of JACK * as they would be used by many applications. */ #include #include #include #include #include #include #include jack_port_t *input_port; jack_port_t *output_port; jack_client_t *client; jack_default_audio_sample_t *delay_line; jack_nframes_t delay_index; jack_nframes_t latency = 1024; #ifdef WIN32 #define jack_sleep(val) Sleep((val)) #else #define jack_sleep(val) usleep((val) * 1000) #endif /** * 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) */ int process (jack_nframes_t nframes, void *arg) { jack_default_audio_sample_t *in, *out; int k; in = jack_port_get_buffer (input_port, nframes); out = jack_port_get_buffer (output_port, nframes); for (k=0; k