diff --git a/libs/backends/jack/jack_audiobackend.cc b/libs/backends/jack/jack_audiobackend.cc index 64991c1623..a51c385fa4 100644 --- a/libs/backends/jack/jack_audiobackend.cc +++ b/libs/backends/jack/jack_audiobackend.cc @@ -833,19 +833,20 @@ JACKAudioBackend::create_process_thread (boost::function f) int JACKAudioBackend::join_process_threads () { - GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1); - int ret = 0; for (std::vector::const_iterator i = _jack_threads.begin (); i != _jack_threads.end(); i++) { #if defined(USING_JACK2_EXPANSION_OF_JACK_API) || defined(PLATFORM_WINDOWS) - if (jack_client_stop_thread (_priv_jack, *i) != 0) { + // jack_client is not used by JACK2's implementation + // also jack_client_close() leaves threads active + if (jack_client_stop_thread ((jack_client_t)NULL, *i) != 0) #else void* status; - if (pthread_join (*i, &status) != 0) { + if (pthread_join (*i, &status) != 0) #endif + { error << "AudioEngine: cannot stop process thread" << endmsg; ret += -1; }