From 9bd21f8fef6ec692e2765bb83fe9ab2a5ba53c83 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 27 Sep 2014 02:40:25 +0000 Subject: Exit on Jack shutdown (close #978). git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5468 a436a847-0d15-0410-975c-d299462d15a1 --- NEWS | 6 ++++++ src/jalv.c | 11 +++++++++++ wscript | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index bdcc701..5cb26c5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +jalv (1.4.7) unstable; + + * Exit on jack shutdown + + -- David Robillard Fri, 26 Sep 2014 22:36:07 -0400 + jalv (1.4.6) stable; * Show newly saved presets in the preset menu diff --git a/src/jalv.c b/src/jalv.c index a60d09b..a50216a 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -414,6 +414,15 @@ jack_buffer_size_cb(jack_nframes_t nframes, void* data) return 0; } +/** Jack shutdown callback. */ +static void +jack_shutdown_cb(void* data) +{ + Jalv* const jalv = (Jalv*)data; + jalv_close_ui(jalv); + zix_sem_post(jalv->done); +} + /** Jack process callback. */ static REALTIME int jack_process_cb(jack_nframes_t nframes, void* data) @@ -1187,6 +1196,8 @@ main(int argc, char** argv) &jack_process_cb, (void*)(&jalv)); jack_set_buffer_size_callback(jalv.jack_client, &jack_buffer_size_cb, (void*)(&jalv)); + jack_on_shutdown(jalv.jack_client, + &jack_shutdown_cb, (void*)(&jalv)); #ifdef JALV_JACK_SESSION jack_set_session_callback(jalv.jack_client, &jack_session_cb, (void*)(&jalv)); diff --git a/wscript b/wscript index cc755f1..61a3664 100644 --- a/wscript +++ b/wscript @@ -4,7 +4,7 @@ from waflib.extras import autowaf as autowaf import waflib.Options as Options # Version of this package (even if built as a child) -JALV_VERSION = '1.4.6' +JALV_VERSION = '1.4.7' # Variables for 'waf dist' APPNAME = 'jalv' -- cgit v1.2.1