Browse Source

Fix bad behavior when jack clients return a nonzero value in their process callback. (as reported by Rui and Fernando)

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@1073 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
pieterpalmers 18 years ago
parent
commit
646dd40fba
4 changed files with 16 additions and 9 deletions
  1. +3
    -3
      configure.ac
  2. +1
    -0
      jack/internal.h
  3. +6
    -0
      jackd/engine.c
  4. +6
    -6
      libjack/client.c

+ 3
- 3
configure.ac View File

@@ -16,8 +16,8 @@ dnl micro version = incremented when implementation-only
dnl changes are made
dnl ---
JACK_MAJOR_VERSION=0
JACK_MINOR_VERSION=107
JACK_MICRO_VERSION=9
JACK_MINOR_VERSION=108
JACK_MICRO_VERSION=0

dnl ---
dnl HOWTO: updating the jack protocol version
@@ -27,7 +27,7 @@ dnl made to the way libjack communicates with jackd
dnl that would break applications linked with an older
dnl version of libjack.
dnl ---
JACK_PROTOCOL_VERSION=21
JACK_PROTOCOL_VERSION=22

dnl ---
dnl HOWTO: updating the libjack interface version


+ 1
- 0
jack/internal.h View File

@@ -225,6 +225,7 @@ typedef volatile struct {
volatile uint64_t signalled_at;
volatile uint64_t awake_at;
volatile uint64_t finished_at;
volatile int32_t last_status; /* w: client, r: engine and client */

/* JOQ: all these pointers are trouble for 32/64 compatibility,
* they should move to non-shared memory.


+ 6
- 0
jackd/engine.c View File

@@ -2032,6 +2032,12 @@ jack_run_one_cycle (jack_engine_t *engine, jack_nframes_t nframes,
client->control->name);
client->error++;
}
if(client->control->last_status != 0) {
VERBOSE(engine,
"client %s has nonzero process callback status (%d)\n",
client->control->name, client->control->last_status);
client->error++;
}
}
DEBUG ("client %s errors = %d", client->control->name,


+ 6
- 6
libjack/client.c View File

@@ -1470,20 +1470,20 @@ jack_thread_first_wait (jack_client_t* client)
jack_nframes_t
jack_thread_wait (jack_client_t* client, int status)
{
jack_client_control_t *control = client->control;
client->control->last_status = status;

/* SECTION ONE: HOUSEKEEPING/CLEANUP FROM LAST DATA PROCESSING */

/* housekeeping/cleanup after data processing */

if (status == 0 && control->timebase_cb) {
if (status == 0 && client->control->timebase_cb) {
jack_call_timebase_master (client);
}
/* end preemption checking */
CHECK_PREEMPTION (client->engine, FALSE);
control->finished_at = jack_get_microseconds();
client->control->finished_at = jack_get_microseconds();
/* wake the next client in the chain (could be the server),
and check if we were killed during the process
@@ -1509,15 +1509,15 @@ jack_thread_wait (jack_client_t* client, int status)

/* Time to do data processing */

control->state = Running;
client->control->state = Running;
/* begin preemption checking */
CHECK_PREEMPTION (client->engine, TRUE);
if (control->sync_cb)
if (client->control->sync_cb)
jack_call_sync_client (client);

return control->nframes;
return client->control->nframes;
}

static void *


Loading…
Cancel
Save