From da76cef89fbdc2210a70303375443b1e4ff04f21 Mon Sep 17 00:00:00 2001 From: sletz Date: Tue, 8 Mar 2011 16:21:24 +0000 Subject: [PATCH] Add missing file. git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4153 0c269be4-1314-0410-8aa9-9f06e86f4224 --- example-clients/latent_client.c | 208 ++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 example-clients/latent_client.c diff --git a/example-clients/latent_client.c b/example-clients/latent_client.c new file mode 100644 index 00000000..dde6c94a --- /dev/null +++ b/example-clients/latent_client.c @@ -0,0 +1,208 @@ +/** @file simple_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 + +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; + +/** + * 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