summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@falktx.com>2019-02-21 12:14:18 +0100
committerfalkTX <falktx@falktx.com>2019-02-21 12:14:18 +0100
commit19e468cc78813ac279afd8dfcc516d4052dd1d78 (patch)
tree1a2a43824daec04a638c60fd20e3f2a0487bef79
parent98c882c5a545c3dd819655c9869f6928274df8a3 (diff)
downloadjack2-19e468cc78813ac279afd8dfcc516d4052dd1d78.tar.gz
Sync example-clients/connect.c with jack1
Signed-off-by: falkTX <falktx@falktx.com>
-rw-r--r--example-clients/connect.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/example-clients/connect.c b/example-clients/connect.c
index 5494ab94..b302ce67 100644
--- a/example-clients/connect.c
+++ b/example-clients/connect.c
@@ -23,28 +23,21 @@
#endif
#include <string.h>
#include <stdlib.h>
-#include <math.h>
#include <getopt.h>
+
#include <jack/jack.h>
#include <jack/session.h>
-jack_port_t *input_port;
-jack_port_t *output_port;
-int connecting, disconnecting;
-volatile int done = 0;
#define TRUE 1
#define FALSE 0
+volatile int done = 0;
+
void port_connect_callback(jack_port_id_t a, jack_port_id_t b, int connect, void* arg)
{
done = 1;
}
-void error_callback (const char *err)
-{
- //fprintf (stderr, "%s\n", err);
-}
-
void
show_version (char *my_name)
{
@@ -138,17 +131,10 @@ main (int argc, char *argv[])
return 1;
}
- jack_set_error_function(error_callback);
-
/* try to become a client of the JACK server */
if ((client = jack_client_open (my_name, options, &status, server_name)) == 0) {
- fprintf (stderr, "Error: cannot connect to JACK, ");
- if (status & JackServerFailed) {
- fprintf (stderr, "server is not running.\n");
- } else {
- fprintf (stderr, "jack_client_open() failed, status = 0x%2.0x\n", status);
- }
+ fprintf (stderr, "jack server not running?\n");
return 1;
}