Browse Source

Cleanup

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1301 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.59
sletz 19 years ago
parent
commit
27f221269a
1 changed files with 15 additions and 17 deletions
  1. +15
    -17
      windows/JackWinEvent.cpp

+ 15
- 17
windows/JackWinEvent.cpp View File

@@ -37,13 +37,13 @@ bool JackWinEvent::Signal()
assert(fEvent);

if (fFlush)
return true;
return true;
if (!(res = SetEvent(fEvent))) {
jack_error("JackWinEvent::Signal name = %s err = %ld", fName, GetLastError());
}
}
return res;
return res;
}

bool JackWinEvent::SignalAll()
@@ -52,22 +52,21 @@ bool JackWinEvent::SignalAll()
assert(fEvent);

if (fFlush)
return true;
return true;
if (!(res = SetEvent(fEvent))) {
jack_error("JackWinEvent::SignalAll name = %s err = %ld", fName, GetLastError());
}
}
return res;
return res;
}

bool JackWinEvent::Wait()
{
DWORD res;

if ((res = WaitForSingleObject(fEvent, INFINITE)) != WAIT_OBJECT_0) {
if (res == WAIT_TIMEOUT)
jack_error("JackWinEvent::TimedWait name = %s time_out", fName);
if ((res = WaitForSingleObject(fEvent, INFINITE)) == WAIT_TIMEOUT) {
jack_error("JackWinEvent::TimedWait name = %s time_out", fName);
}

return (res == WAIT_OBJECT_0);
@@ -75,12 +74,11 @@ bool JackWinEvent::Wait()

bool JackWinEvent::TimedWait(long usec)
{
DWORD res;
DWORD res;

if ((res = WaitForSingleObject(fEvent, usec / 1000)) != WAIT_OBJECT_0) {
if (res == WAIT_TIMEOUT)
jack_error("JackWinEvent::TimedWait name = %s time_out", fName);
}
if ((res = WaitForSingleObject(fEvent, usec / 1000)) == WAIT_TIMEOUT) {
jack_error("JackWinEvent::TimedWait name = %s time_out", fName);
}

return (res == WAIT_OBJECT_0);
}
@@ -97,7 +95,7 @@ bool JackWinEvent::ConnectInput(const char* name)
return true;
}

if ((fEvent = OpenEvent(EVENT_ALL_ACCESS, FALSE, fName)) == NULL) {
if ((fEvent = OpenEvent(EVENT_ALL_ACCESS, FALSE, fName)) == NULL) {
jack_error("Connect: can't check in named event name = %s err = %ld", fName, GetLastError());
return false;
} else {
@@ -118,7 +116,7 @@ bool JackWinEvent::ConnectOutput(const char* name)
bool JackWinEvent::Disconnect()
{
if (fEvent) {
JackLog("JackWinEvent::Disconnect %s\n", fName);
JackLog("JackWinEvent::Disconnect %s\n", fName);
CloseHandle(fEvent);
fEvent = NULL;
return true;


Loading…
Cancel
Save