diff options
author | David Robillard <d@drobilla.net> | 2014-09-27 02:40:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-09-27 02:40:25 +0000 |
commit | 9bd21f8fef6ec692e2765bb83fe9ab2a5ba53c83 (patch) | |
tree | a6fbb8d2e267270af6a91fb6e181c0eb1dee6321 /src | |
parent | 5c369f94a202f3a1f2494fa9784c7008a328fbdd (diff) | |
download | jalv-9bd21f8fef6ec692e2765bb83fe9ab2a5ba53c83.tar.gz jalv-9bd21f8fef6ec692e2765bb83fe9ab2a5ba53c83.tar.bz2 jalv-9bd21f8fef6ec692e2765bb83fe9ab2a5ba53c83.zip |
Exit on Jack shutdown (close #978).
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5468 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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)); |