diff --git a/jack/jack.h b/jack/jack.h index 8a552c3..0754392 100644 --- a/jack/jack.h +++ b/jack/jack.h @@ -253,6 +253,11 @@ int jack_set_thread_init_callback (jack_client_t *client, * NOTE: clients do not need to call this. It exists only * to help more complex clients understand what is going * on. It should be called before jack_client_activate(). + * + * NOTE: if a client calls this AND jack_on_info_shutdown(), then + * the event of a client thread shutdown, the callback + * passed to this function will not be called, and the one passed to + * jack_on_info_shutdown() will. */ void jack_on_shutdown (jack_client_t *client, JackShutdownCallback function, void *arg); @@ -274,6 +279,11 @@ void jack_on_shutdown (jack_client_t *client, * NOTE: clients do not need to call this. It exists only * to help more complex clients understand what is going * on. It should be called before jack_client_activate(). + * + * NOTE: if a client calls this AND jack_on_shutdown(), then in the + * event of a client thread shutdown, the callback passed to + * this function will be called, and the one passed to + * jack_on_shutdown() will not. */ void jack_on_info_shutdown (jack_client_t *client, JackInfoShutdownCallback function, void *arg); diff --git a/libjack/client.c b/libjack/client.c index b57980a..d984e4b 100644 --- a/libjack/client.c +++ b/libjack/client.c @@ -1788,7 +1788,7 @@ jack_client_process_thread (void *arg) jack_client_t *client = (jack_client_t *) arg; jack_client_control_t *control = client->control; int err = 0; - + if (client->control->thread_init_cbset) { /* this means that the init callback will be called twice -taybin*/ DEBUG ("calling client thread init callback"); @@ -1836,7 +1836,7 @@ jack_client_process_thread (void *arg) /* check if we were killed during the process cycle * (or whatever) */ - + if (client->control->dead) { jack_error ("jack_client_process_thread: " "client->control->dead"); diff --git a/libjack/local.h b/libjack/local.h index 3043d86..ef03235 100644 --- a/libjack/local.h +++ b/libjack/local.h @@ -29,7 +29,7 @@ struct _jack_client { char fifo_prefix[PATH_MAX+1]; void (*on_shutdown)(void *arg); void *on_shutdown_arg; - void (*on_info_shutdown)(int, const char*, void *arg); + void (*on_info_shutdown)(jack_status_t, const char*, void *arg); void *on_info_shutdown_arg; char thread_ok : 1; char first_active : 1;