|
|
@@ -188,7 +188,7 @@ int JackClient::ClientNotify(int refnum, const char* name, int notify, int sync, |
|
|
res = fXrun(fXrunArg); |
|
|
res = fXrun(fXrunArg); |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case JackNotifyChannelInterface::kZombifyClient:
|
|
|
|
|
|
|
|
|
case JackNotifyChannelInterface::kZombifyClient: |
|
|
//res = fThread->Kill(); Really neede ?? Unsafe in WIN32... |
|
|
//res = fThread->Kill(); Really neede ?? Unsafe in WIN32... |
|
|
JackLog("JackClient::kZombifyClient name = %s ref = %ld \n", name, refnum); |
|
|
JackLog("JackClient::kZombifyClient name = %s ref = %ld \n", name, refnum); |
|
|
ShutDown(); |
|
|
ShutDown(); |
|
|
@@ -207,16 +207,18 @@ int JackClient::Activate() |
|
|
{ |
|
|
{ |
|
|
JackLog("JackClient::Activate \n"); |
|
|
JackLog("JackClient::Activate \n"); |
|
|
if (IsActive()) |
|
|
if (IsActive()) |
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
|
|
// Done first so that the RT thread then access an allocated synchro
|
|
|
|
|
|
if (!fSynchroTable[GetClientControl()->fRefNum]->Connect(GetClientControl()->fName)) {
|
|
|
|
|
|
jack_error("Cannot ConnectSemaphore %s client", GetClientControl()->fName);
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (StartThread() < 0)
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef WIN32 |
|
|
|
|
|
// Done first so that the RT thread then access an allocated synchro |
|
|
|
|
|
if (!fSynchroTable[GetClientControl()->fRefNum]->Connect(GetClientControl()->fName)) { |
|
|
|
|
|
jack_error("Cannot ConnectSemaphore %s client", GetClientControl()->fName); |
|
|
|
|
|
return -1; |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if (StartThread() < 0) |
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
|
int result = -1; |
|
|
int result = -1; |
|
|
fChannel->ClientActivate(GetClientControl()->fRefNum, &result); |
|
|
fChannel->ClientActivate(GetClientControl()->fRefNum, &result); |
|
|
@@ -248,12 +250,13 @@ int JackClient::Deactivate() |
|
|
|
|
|
|
|
|
JackLog("JackClient::Deactivate res = %ld \n", result); |
|
|
JackLog("JackClient::Deactivate res = %ld \n", result); |
|
|
// We need to wait for the new engine cycle before stopping the RT thread, but this is done by ClientDeactivate |
|
|
// We need to wait for the new engine cycle before stopping the RT thread, but this is done by ClientDeactivate |
|
|
|
|
|
|
|
|
// steph
|
|
|
|
|
|
fSynchroTable[GetClientControl()->fRefNum]->Disconnect();
|
|
|
|
|
|
fThread->Stop();
|
|
|
|
|
|
|
|
|
|
|
|
//fThread->Kill();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WIN32 |
|
|
|
|
|
fSynchroTable[GetClientControl()->fRefNum]->Disconnect(); |
|
|
|
|
|
fThread->Stop(); |
|
|
|
|
|
#else |
|
|
|
|
|
fThread->Kill(); |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|