From fd41ff9febf15ef3db24e76f913397b8766bee1b Mon Sep 17 00:00:00 2001 From: sletz Date: Fri, 1 Feb 2008 12:19:40 +0000 Subject: [PATCH] Windows git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1812 0c269be4-1314-0410-8aa9-9f06e86f4224 --- example-clients/simple_client.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/example-clients/simple_client.c b/example-clients/simple_client.c index 90e6e1b4..5ac0da40 100644 --- a/example-clients/simple_client.c +++ b/example-clients/simple_client.c @@ -10,7 +10,7 @@ #include #include -#include "jack.h" +#include jack_port_t *input_port; jack_port_t *output_port1, *output_port2; @@ -27,7 +27,14 @@ typedef struct int left_phase; int right_phase; } -paTestData; +paTestData; + +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 */ @@ -160,7 +167,12 @@ main (int argc, char *argv[]) if ((input_port == NULL) || (output_port1 == NULL) || (output_port2 == NULL)) { fprintf(stderr, "no more JACK ports available\n"); 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. */ @@ -206,8 +218,8 @@ main (int argc, char *argv[]) fprintf (stderr, "cannot connect output ports\n"); } - free (ports); - + free (ports); + /* keep running until the transport stops */ while (client_state != Exit) {