@@ -326,9 +326,9 @@ void JackEngine::NotifyRemoveClient(const char* name, int refnum) | |||||
{ | { | ||||
// Notify existing clients (including the one beeing suppressed) of the removed client | // Notify existing clients (including the one beeing suppressed) of the removed client | ||||
for (int i = 0; i < CLIENT_NUM; i++) { | for (int i = 0; i < CLIENT_NUM; i++) { | ||||
JackClientInterface* client = fClientTable[refnum]; | |||||
JackClientInterface* client = fClientTable[i]; | |||||
if (client) { | if (client) { | ||||
ClientNotify(fClientTable[i], refnum, name, kRemoveClient, false, "", 0, 0); | |||||
ClientNotify(client, refnum, name, kRemoveClient, false, "", 0, 0); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -749,7 +749,7 @@ int JackEngine::ClientCloseAux(int refnum, bool wait) | |||||
} | } | ||||
// Notify running clients | // Notify running clients | ||||
NotifyRemoveClient(client->GetClientControl()->fName, client->GetClientControl()->fRefNum); | |||||
NotifyRemoveClient(client->GetClientControl()->fName, refnum); | |||||
// Cleanup... | // Cleanup... | ||||
fSynchroTable[refnum].Destroy(); | fSynchroTable[refnum].Destroy(); | ||||
@@ -2334,8 +2334,7 @@ int JackCoreAudioDriver::Start() | |||||
fState = false; | fState = false; | ||||
int count = 0; | int count = 0; | ||||
OSStatus err = AudioOutputUnitStart(fAUHAL); | |||||
if (err == noErr) { | |||||
if (AudioOutputUnitStart(fAUHAL) == noErr) { | |||||
while (!fState && count++ < WAIT_COUNTER) { | while (!fState && count++ < WAIT_COUNTER) { | ||||
usleep(100000); | usleep(100000); | ||||
@@ -2388,10 +2387,9 @@ int JackCoreAudioDriver::SetBufferSize(jack_nframes_t buffer_size) | |||||
bool JackCoreAudioDriver::TakeHogAux(AudioDeviceID deviceID, bool isInput) | bool JackCoreAudioDriver::TakeHogAux(AudioDeviceID deviceID, bool isInput) | ||||
{ | { | ||||
pid_t hog_pid; | pid_t hog_pid; | ||||
OSStatus err; | |||||
UInt32 propSize = sizeof(hog_pid); | UInt32 propSize = sizeof(hog_pid); | ||||
err = AudioDeviceGetProperty(deviceID, 0, isInput, kAudioDevicePropertyHogMode, &propSize, &hog_pid); | |||||
OSStatus err = AudioDeviceGetProperty(deviceID, 0, isInput, kAudioDevicePropertyHogMode, &propSize, &hog_pid); | |||||
if (err) { | if (err) { | ||||
jack_error("Cannot read hog state..."); | jack_error("Cannot read hog state..."); | ||||
printError(err); | printError(err); | ||||