mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
fix jack thread joining
at the time the graph gets around to takes down client threads, the jack-backend’s jack_client has been reset. But never mind: libjack does not care about it, anyway.
This commit is contained in:
parent
55ba5208b9
commit
66eef257d8
1 changed files with 5 additions and 4 deletions
|
|
@ -833,19 +833,20 @@ JACKAudioBackend::create_process_thread (boost::function<void()> f)
|
|||
int
|
||||
JACKAudioBackend::join_process_threads ()
|
||||
{
|
||||
GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1);
|
||||
|
||||
int ret = 0;
|
||||
|
||||
for (std::vector<jack_native_thread_t>::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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue