diff --git a/ChangeLog b/ChangeLog index c973fe42..83e0f86f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ Nedko Arnaudov * Correct jack_internal_client_load for wrapper layer. * In thread model, execute a dummy cycle to be sure thread has the correct properties (ensure thread creation is finished). * Correct jack_port_get_connections function (should return NULL when no connections). + * Start client RT thread only if a thread routine or callback has been setup with jack_set_process_callback or jack_set_process_thread. 2008-03-10 Stephane Letz diff --git a/common/JackClient.cpp b/common/JackClient.cpp index 81543945..b2b7b6c6 100644 --- a/common/JackClient.cpp +++ b/common/JackClient.cpp @@ -250,8 +250,9 @@ int JackClient::Activate() #endif */ - if (StartThread() < 0) - return -1; + if (fProcess || fThreadFun) + if (StartThread() < 0) + return -1; int result = -1; fChannel->ClientActivate(GetClientControl()->fRefNum, &result); @@ -292,7 +293,8 @@ int JackClient::Deactivate() fThread->Kill(); #endif */ - fThread->Kill(); + if (fProcess || fThreadFun) + fThread->Kill(); return result; }