From 1cb8d31cbb60b7a1a0d2e6d111c1cd85e5dd73ab Mon Sep 17 00:00:00 2001 From: sletz Date: Mon, 2 Jun 2008 10:19:39 +0000 Subject: [PATCH] Cleanup and correct wscript for example-clients. git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2412 0c269be4-1314-0410-8aa9-9f06e86f4224 --- ChangeLog | 4 ++++ example-clients/lsp.c | 4 ++-- example-clients/metro.c | 6 ------ example-clients/simple_client.c | 15 +++------------ example-clients/wscript | 8 ++++---- 5 files changed, 13 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index c22dba7d..fce364c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,10 @@ Fernando Lopez-Lezcano Jackdmp changes log --------------------------- +2008-06-02 Stephane Letz + + * Cleanup and correct wscript for example-clients. + 2008-05-31 Stephane Letz * Add missing include for proper compilation when jack headers are not installed. diff --git a/example-clients/lsp.c b/example-clients/lsp.c index 692462f6..baaa9b91 100644 --- a/example-clients/lsp.c +++ b/example-clients/lsp.c @@ -178,13 +178,13 @@ main (int argc, char *argv[]) } if (show_port_latency) { if (port) { - printf (" port latency = %ld frames\n", + printf (" port latency = %d frames\n", jack_port_get_latency (port)); } } if (show_total_latency) { if (port) { - printf (" total latency = %ld frames\n", + printf (" total latency = %d frames\n", jack_port_get_total_latency (client, port)); } } diff --git a/example-clients/metro.c b/example-clients/metro.c index 9a56d464..92375569 100644 --- a/example-clients/metro.c +++ b/example-clients/metro.c @@ -112,12 +112,6 @@ process (jack_nframes_t nframes, void *arg) return 0; } -static int -sample_rate_change () { - printf("Sample rate has changed! Exiting...\n"); - exit(-1); -} - int main (int argc, char *argv[]) { diff --git a/example-clients/simple_client.c b/example-clients/simple_client.c index e68aefea..35a17584 100644 --- a/example-clients/simple_client.c +++ b/example-clients/simple_client.c @@ -10,6 +10,9 @@ #include #include #include +#ifndef WIN32 +#include +#endif #include jack_port_t *input_port; @@ -36,13 +39,6 @@ static void signal_handler(int sig) exit(0); } -static int Jack_Graph_Order_Callback(void *arg) -{ - static int reorder = 0; - printf("Jack_Graph_Order_Callback count = %ld\n", reorder++); - return 0; -} - /* a simple state machine for this client */ volatile enum { Init, @@ -175,11 +171,6 @@ main (int argc, char *argv[]) exit (1); } - if (jack_set_graph_order_callback(client, Jack_Graph_Order_Callback, 0) != 0) { - printf("Error when calling Jack_Graph_Order_Callback() !\n"); - } - - /* Tell the JACK server that we are ready to roll. Our * process() callback will start running now. */ diff --git a/example-clients/wscript b/example-clients/wscript index 3282058f..5cb60eb2 100644 --- a/example-clients/wscript +++ b/example-clients/wscript @@ -46,12 +46,12 @@ def configure(conf): e.define = 'HAVE_READLINE' e.run() - if conf.is_defined('HAVE_NCURSES'): - conf.env['LIB_NCURSES'] = ['ncurses'] + if conf.is_defined('HAVE_READLINE'): + conf.env['LIB_READLINE'] = ['readline'] conf.env['BUILD_EXAMPLE_CLIENT_TRANSPORT'] = conf.is_defined('HAVE_READLINE') and conf.is_defined('HAVE_NCURSES') - conf.env['BUILD_EXAMPLE_CLIENT_TRANSPORT'] = conf.is_defined('HAVE_SNDFILE') + conf.env['BUILD_EXAMPLE_CLIENT_REC'] = conf.is_defined('HAVE_SNDFILE') def build(bld): for example_program, example_program_source in example_programs.items(): @@ -70,7 +70,7 @@ def build(bld): prog.uselib_local = 'clientlib' prog.target = 'jack_transport' - if bld.env()['BUILD_EXAMPLE_CLIENT_TRANSPORT'] == True: + if bld.env()['BUILD_EXAMPLE_CLIENT_REC'] == True: prog = bld.create_obj('cc', 'program') prog.includes = ['../common/jack'] prog.source = 'capture_client.c'