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
@ -833,19 +833,20 @@ JACKAudioBackend::create_process_thread (boost::function<void()> f)
|
|||||||
int
|
int
|
||||||
JACKAudioBackend::join_process_threads ()
|
JACKAudioBackend::join_process_threads ()
|
||||||
{
|
{
|
||||||
GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1);
|
|
||||||
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
for (std::vector<jack_native_thread_t>::const_iterator i = _jack_threads.begin ();
|
for (std::vector<jack_native_thread_t>::const_iterator i = _jack_threads.begin ();
|
||||||
i != _jack_threads.end(); i++) {
|
i != _jack_threads.end(); i++) {
|
||||||
|
|
||||||
#if defined(USING_JACK2_EXPANSION_OF_JACK_API) || defined(PLATFORM_WINDOWS)
|
#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
|
#else
|
||||||
void* status;
|
void* status;
|
||||||
if (pthread_join (*i, &status) != 0) {
|
if (pthread_join (*i, &status) != 0)
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
error << "AudioEngine: cannot stop process thread" << endmsg;
|
error << "AudioEngine: cannot stop process thread" << endmsg;
|
||||||
ret += -1;
|
ret += -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user