diff options
author | David Robillard <d@drobilla.net> | 2009-05-12 01:29:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-12 01:29:45 +0000 |
commit | 61e8765a7b9afda01eb52b5a240701849fd9e116 (patch) | |
tree | 7d3d78734e064d7f6aa15240000f2cd985f72b63 | |
parent | c27c148a8a68286f6f2d8174f6d229baa9d14c38 (diff) | |
download | patchage-61e8765a7b9afda01eb52b5a240701849fd9e116.tar.gz patchage-61e8765a7b9afda01eb52b5a240701849fd9e116.tar.bz2 patchage-61e8765a7b9afda01eb52b5a240701849fd9e116.zip |
Gracefully handle JACK shutdown/zombification/etc.
Fix ticket #351.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@1984 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/JackDriver.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index b98005c..4077b1a 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -105,11 +105,11 @@ JackDriver::detach() _shutdown_mutex.lock(); _client = NULL; _shutdown_mutex.unlock(); - destroy_all_ports(); - _is_activated = false; - signal_detached.emit(); - _app->status_msg("[JACK] Detached"); } + destroy_all_ports(); + _is_activated = false; + signal_detached.emit(); + _app->status_msg("[JACK] Detached"); } @@ -532,22 +532,22 @@ JackDriver::jack_xrun_cb(void* jack_driver) void JackDriver::jack_shutdown_cb(void* jack_driver) { + cerr << "[JACK] Shutdown" << endl; assert(jack_driver); JackDriver* me = reinterpret_cast<JackDriver*>(jack_driver); - assert(me->_client); - - jack_reset_max_delayed_usecs(me->_client); - me->_shutdown_mutex.lock(); me->_client = NULL; me->_shutdown_mutex.unlock(); + me->destroy_all_ports(); + me->_is_activated = false; + me->signal_detached.emit(); } void JackDriver::error_cb(const char* msg) { - cerr << "JACK ERROR: " << msg << endl; + cerr << "[JACK] ERROR: " << msg << endl; } |