Browse Source

Cleanup

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2222 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
5acaa886fb
2 changed files with 10 additions and 13 deletions
  1. +1
    -2
      common/JackException.h
  2. +9
    -11
      common/JackThreadedDriver.cpp

+ 1
- 2
common/JackException.h View File

@@ -45,7 +45,7 @@ namespace Jack
void PrintMessage()
{
std::string str = what();
jack_error(str.c_str());
jack_info(str.c_str());
}
};
@@ -58,7 +58,6 @@ namespace Jack
JackDriverException(const char* msg) : JackException(msg)
{}
};

}

#endif

+ 9
- 11
common/JackThreadedDriver.cpp View File

@@ -115,17 +115,15 @@ bool JackThreadedDriver::Init()

bool JackRestartThreadedDriver::Execute()
{
while (fThread->GetStatus() == JackThread::kRunning) {
try {
// Keep running even in case of error
while (fThread->GetStatus() == JackThread::kRunning) {
Process();
}
} catch (JackDriverException e) {
e.PrintMessage();
jack_log("Driver is restarted");
Init();
}
try {
// Keep running even in case of error
while (fThread->GetStatus() == JackThread::kRunning) {
Process();
}
} catch (JackDriverException e) {
e.PrintMessage();
jack_log("Driver is restarted");
return Init();
}
return false;
}


Loading…
Cancel
Save