Browse Source

latency fix, plus latency output from jack_lsp

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@279 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
pbd 23 years ago
parent
commit
fff065e089
3 changed files with 18 additions and 8 deletions
  1. +3
    -3
      configure.in
  2. +11
    -0
      example-clients/lsp.c
  3. +4
    -5
      jackd/engine.c

+ 3
- 3
configure.in View File

@@ -14,7 +14,7 @@ dnl changes are made
dnl ---
JACK_MAJOR_VERSION=0
JACK_MINOR_VERSION=41
JACK_MICRO_VERSION=0
JACK_MICRO_VERSION=1

dnl ---
dnl HOWTO: updating the libjack interface version
@@ -31,8 +31,8 @@ dnl slacker than this, and closer to those for the JACK version
dnl number.
dnl ---
JACK_API_CURRENT=0
JACK_API_REVISION=6
JACK_API_AGE=0
JACK_API_REVISION=7
JACK_API_AGE=1

AC_SUBST(JACK_MAJOR_VERSION)
AC_SUBST(JACK_MINOR_VERSION)


+ 11
- 0
example-clients/lsp.c View File

@@ -12,11 +12,15 @@ main (int argc, char *argv[])
const char **ports, **connections;
unsigned int i, j;
int show_con = 0;
int show_latency = 0;

for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-c")) {
show_con = 1;
}
if (!strcmp(argv[i], "-l")) {
show_latency = 1;
}
}

/* try to become a client of the JACK server */
@@ -38,6 +42,13 @@ main (int argc, char *argv[])
free (connections);
}
}
if (show_latency) {
jack_port_t *port = jack_port_by_name (client, ports[i]);
if (port) {
printf (" latency = %lu frames\n", jack_port_get_total_latency (client, port));
free (port);
}
}
}
jack_client_close (client);


+ 4
- 5
jackd/engine.c View File

@@ -2401,8 +2401,7 @@ jack_get_port_total_latency (jack_engine_t *engine, jack_port_internal_t *port,

if ((toward_port && (connection->source->shared == port->shared)) ||
/* !toward_port is implicit */
(connection->destination->shared == port->shared)) {
(!toward_port && (connection->destination->shared == port->shared))) {
continue;
}

@@ -2448,10 +2447,10 @@ jack_compute_all_port_total_latencies (jack_engine_t *engine)

for (i = 0; i < engine->control->port_max; i++) {
if (shared[i].in_use) {
if (shared->flags & JackPortIsOutput) {
toward_port = TRUE;
} else {
if (shared[i].flags & JackPortIsOutput) {
toward_port = FALSE;
} else {
toward_port = TRUE;
}
shared[i].total_latency = jack_get_port_total_latency (engine, &engine->internal_ports[i], 0, toward_port);
}


Loading…
Cancel
Save