Browse Source

Fix for MacOSX version

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@716 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
letz 22 years ago
parent
commit
d9b6760c4e
2 changed files with 19 additions and 3 deletions
  1. +14
    -0
      jackd/engine.c
  2. +5
    -3
      libjack/client.c

+ 14
- 0
jackd/engine.c View File

@@ -1213,10 +1213,15 @@ jack_engine_load_driver (jack_engine_t *engine, jack_driver_desc_t * driver_desc
engine->driver_params = driver_params;

if (engine->control->real_time) {
/* Stephane Letz : letz@grame.fr
Watch dog thread is not needed on MacOSX since CoreAudio drivers already contains a similar mechanism.
*/
#ifndef JACK_USE_MACH_THREADS
if (jack_start_watchdog (engine)) {
return -1;
}
engine->watchdog_check = 1;
#endif
}
return 0;
}
@@ -1813,6 +1818,8 @@ jack_server_thread (void *arg)

while (!done) {
DEBUG ("start while");
pthread_testcancel();

/* XXX race here with new external clients
causing engine->pfd to be reallocated.
@@ -2170,6 +2177,7 @@ jack_watchdog_thread (void *arg)
engine->watchdog_check = 0;

while (1) {
pthread_testcancel();
usleep (5000000);
if ( engine->watchdog_check == 0) {

@@ -2480,8 +2488,14 @@ jack_engine_delete (jack_engine_t *engine)
* but 2.4 works OK.
*/
VERBOSE (engine, "stopping watchdog thread\n");

/* Stephane Letz : letz@grame.fr
Watch dog thread is not needed on MacOSX since CoreAudio drivers already contains a similar mechanism.
*/
#ifndef JACK_USE_MACH_THREADS
pthread_cancel (engine->watchdog_thread);
pthread_join (engine->watchdog_thread, NULL);
#endif

/* free engine control shm segment */
engine->control = NULL;


+ 5
- 3
libjack/client.c View File

@@ -435,6 +435,8 @@ _start_server (void)
}
}

// steph
#define JACK_LOCATION
if (!good) {
#if defined(USE_CAPABILITIES)
command = JACK_LOCATION "/jackstart";
@@ -978,8 +980,10 @@ jack_client_thread (void *arg)
}

while (err == 0) {
pthread_testcancel();

if (client->engine->engine_ok == 0) {
if (client->engine->engine_ok == 0) {
if (client->on_shutdown)
client->on_shutdown (client->on_shutdown_arg);
else
@@ -1012,8 +1016,6 @@ jack_client_thread (void *arg)
client->pollfd[0].revents,
client->pollfd[1].revents);

pthread_testcancel();

if ((client->pollfd[0].revents & ~POLLIN) ||
client->control->dead) {
goto zombie;


Loading…
Cancel
Save