diff --git a/common/JackEngineProfiling.cpp b/common/JackEngineProfiling.cpp index 0f2814a3..f70cc7e4 100644 --- a/common/JackEngineProfiling.cpp +++ b/common/JackEngineProfiling.cpp @@ -81,7 +81,7 @@ JackEngineProfiling::~JackEngineProfiling() fStream << ((d7 > 0 && d6 > 0) ? (d7 - d6) : 0) << "\t" ; fStream << fProfileTable[i].fClientTable[ref].fStatus << "\t" ;; - } else { // Print tabs + } else { // Print tabs fStream << "\t \t \t \t \t \t \t"; } } @@ -136,7 +136,7 @@ JackEngineProfiling::~JackEngineProfiling() fStream2 << "set xlabel \"audio cycles\"\n"; fStream2 << "set ylabel \"usec\"\n"; fStream2 << "plot \"JackEngineProfiling.log\" using 2 title \"Driver end date\" with lines \n"; - fStream2 << "unset output\n"; + fStream2 << "unset output\n"; } // Clients end date @@ -198,8 +198,8 @@ JackEngineProfiling::~JackEngineProfiling() fStream3 << "\"JackEngineProfiling.log\" using " << ((i + 1) * 7) - 1 << " title \"" << fIntervalTable[i].fName << "\" with lines,"; } } - fStream3 << "\nunset multiplot\n"; - fStream3 << "unset output\n"; + fStream3 << "\nunset multiplot\n"; + fStream3 << "unset output\n"; } } @@ -242,8 +242,8 @@ JackEngineProfiling::~JackEngineProfiling() fStream4 << "\"JackEngineProfiling.log\" using " << ((i + 1) * 7) << " title \"" << fIntervalTable[i].fName << "\" with lines,"; } } - fStream4 << "\nunset multiplot\n"; - fStream4 << "unset output\n"; + fStream4 << "\nunset multiplot\n"; + fStream4 << "unset output\n"; } } @@ -286,8 +286,8 @@ JackEngineProfiling::~JackEngineProfiling() fStream5 << "\"JackEngineProfiling.log\" using " << ((i + 1) * 7) + 1 << " title \"" << fIntervalTable[i].fName << "\" with lines,"; } } - fStream5 << "\nunset multiplot\n"; - fStream5 << "unset output\n"; + fStream5 << "\nunset multiplot\n"; + fStream5 << "unset output\n"; } } diff --git a/macosx/JackMachSemaphore.cpp b/macosx/JackMachSemaphore.cpp index ae0ae8a6..bb350b1b 100644 --- a/macosx/JackMachSemaphore.cpp +++ b/macosx/JackMachSemaphore.cpp @@ -40,8 +40,9 @@ bool JackMachSemaphore::Signal() return false; } - if (fFlush) + if (fFlush) { return true; + } kern_return_t res; if ((res = semaphore_signal(fSemaphore)) != KERN_SUCCESS) { @@ -57,8 +58,9 @@ bool JackMachSemaphore::SignalAll() return false; } - if (fFlush) + if (fFlush) { return true; + } kern_return_t res; // When signaled several times, do not accumulate signals... @@ -150,14 +152,6 @@ bool JackMachSemaphore::ConnectInput(const char* name, const char* server_name) BuildName(name, server_name, fName, sizeof(fName)); kern_return_t res; - // Temporary... A REVOIR - /* - if (fSemaphore > 0) { - jack_log("Already connected name = %s", name); - return true; - } - */ - if (fBootPort == 0) { if ((res = task_get_bootstrap_port(mach_task_self(), &fBootPort)) != KERN_SUCCESS) { jack_error("Connect: can't find bootstrap port err = %s", mach_error_string(res)); diff --git a/windows/JackNetWinSocket.h b/windows/JackNetWinSocket.h index a96f1b0e..153f65bb 100644 --- a/windows/JackNetWinSocket.h +++ b/windows/JackNetWinSocket.h @@ -27,9 +27,9 @@ #include #endif - namespace Jack { + #define E(code, s) { code, s } #define NET_ERROR_CODE WSAGetLastError() #define StrError PrintError diff --git a/windows/JackShmMem_os.h b/windows/JackShmMem_os.h index ba8e87f9..9f1891f9 100644 --- a/windows/JackShmMem_os.h +++ b/windows/JackShmMem_os.h @@ -24,27 +24,27 @@ inline bool CHECK_MLOCK(void* ptr, size_t size) { - if (!VirtualLock((ptr), (size))) { + if (!VirtualLock((ptr), (size))) { SIZE_T minWSS, maxWSS; HANDLE hProc = GetCurrentProcess(); - if (GetProcessWorkingSetSize(hProc, &minWSS, &maxWSS)) { + if (GetProcessWorkingSetSize(hProc, &minWSS, &maxWSS)) { const size_t increase = size + (10 * 4096); - maxWSS += increase; + maxWSS += increase; minWSS += increase; if (!SetProcessWorkingSetSize(hProc, minWSS, maxWSS)) { - jack_error("SetProcessWorkingSetSize error = %d", GetLastError()); + jack_error("SetProcessWorkingSetSize error = %d", GetLastError()); return false; } else if (!VirtualLock((ptr), (size))) { - jack_error("VirtualLock error = %d", GetLastError()); + jack_error("VirtualLock error = %d", GetLastError()); return false; - } else { + } else { return true; } - } else { - return false; + } else { + return false; } - } else { - return true; + } else { + return true; } } @@ -53,3 +53,4 @@ inline bool CHECK_MLOCK(void* ptr, size_t size) #define CHECK_MUNLOCKALL()(false) #endif + diff --git a/windows/JackWinNamedPipe.cpp b/windows/JackWinNamedPipe.cpp index 3b2d8440..8d277673 100644 --- a/windows/JackWinNamedPipe.cpp +++ b/windows/JackWinNamedPipe.cpp @@ -370,52 +370,6 @@ int JackWinAsyncNamedPipeServer::Bind(const char* dir, const char* name, int whi return BindAux(); } -/* -int JackWinAsyncNamedPipeServer::Bind(const char* dir, int which) -{ - snprintf(fName, sizeof(fName), "\\\\.\\pipe\\%s_jack_%d", dir, which); - jack_log("Bind: fName %s", fName); - - if ((fNamedPipe = CreateNamedPipe(fName, - PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access - PIPE_TYPE_MESSAGE | // message type pipe - PIPE_READMODE_MESSAGE | // message-read mode - PIPE_WAIT, // blocking mode - PIPE_UNLIMITED_INSTANCES, // max. instances - BUFSIZE, // output buffer size - BUFSIZE, // input buffer size - INFINITE, // client time-out - NULL)) == INVALID_HANDLE_VALUE) { // no security a - jack_error("Cannot bind server to pipe err = %ld", GetLastError()); - return -1; - } else { - return 0; - } -} - -int JackWinAsyncNamedPipeServer::Bind(const char* dir, const char* name, int which) -{ - snprintf(fName, sizeof(fName), "\\\\.\\pipe\\%s_jack_%s_%d", dir, name, which); - jack_log("Bind: fName %s", fName); - - if ((fNamedPipe = CreateNamedPipe(fName, - PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access - PIPE_TYPE_MESSAGE | // message type pipe - PIPE_READMODE_MESSAGE | // message-read mode - PIPE_WAIT, // blocking mode - PIPE_UNLIMITED_INSTANCES, // max. instances - BUFSIZE, // output buffer size - BUFSIZE, // input buffer size - INFINITE, // client time-out - NULL)) == INVALID_HANDLE_VALUE) { // no security a - jack_error("Cannot bind server to pipe err = %ld", GetLastError()); - return -1; - } else { - return 0; - } -} -*/ - bool JackWinAsyncNamedPipeServer::Accept() { return false; diff --git a/windows/JackWinSemaphore.cpp b/windows/JackWinSemaphore.cpp index 884d9f00..d347f605 100644 --- a/windows/JackWinSemaphore.cpp +++ b/windows/JackWinSemaphore.cpp @@ -38,8 +38,9 @@ bool JackWinSemaphore::Signal() BOOL res; assert(fSemaphore); - if (fFlush) + if (fFlush) { return true; + } if (!(res = ReleaseSemaphore(fSemaphore, 1, NULL))) { jack_error("JackWinSemaphore::Signal name = %s err = %ld", fName, GetLastError()); @@ -53,8 +54,9 @@ bool JackWinSemaphore::SignalAll() BOOL res; assert(fSemaphore); - if (fFlush) + if (fFlush) { return true; + } if (!(res = ReleaseSemaphore(fSemaphore, 1, NULL))) { jack_error("JackWinSemaphore::SignalAll name = %s err = %ld", fName, GetLastError());