Browse Source

Sync example-clients/connect.c with jack1

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.9.13
falkTX 6 years ago
parent
commit
19e468cc78
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 4 additions and 18 deletions
  1. +4
    -18
      example-clients/connect.c

+ 4
- 18
example-clients/connect.c View File

@@ -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;
}



Loading…
Cancel
Save