Commit d56018e0 authored by sletz's avatar sletz
Browse files

Correctly save and restore RT mode state in freewheel mode.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3699 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 1ff726f3
......@@ -25,6 +25,10 @@ Paul Davis
Jackdmp changes log
---------------------------
2009-11-06 Stephane Letz <letz@grame.fr>
* Correctly save and restore RT mode state in freewheel mode.
2009-11-05 Stephane Letz <letz@grame.fr>
* No reason to make jack_on_shutdown deprecated, so revert the incorrect change.
......
......@@ -305,7 +305,15 @@ void JackEngine::NotifyFailure(int code, const char* reason)
void JackEngine::NotifyFreewheel(bool onoff)
{
fEngineControl->fRealTime = !onoff;
if (onoff) {
// Save RT state
fEngineControl->fFWRealTime = fEngineControl->fRealTime;
fEngineControl->fRealTime = false;
} else {
// Restore RT state
fEngineControl->fRealTime = fEngineControl->fFWRealTime;
fEngineControl->fFWRealTime = false;
}
NotifyClients((onoff ? kStartFreewheelCallback : kStopFreewheelCallback), true, "", 0, 0);
}
......
......@@ -58,6 +58,7 @@ struct SERVER_EXPORT JackEngineControl : public JackShmMem
float fXrunDelayedUsecs;
bool fTimeOut;
bool fRealTime;
bool fFWRealTime; // RT state saved and restored during Freewheel mode
int fServerPriority;
int fClientPriority;
int fMaxClientPriority;
......@@ -100,6 +101,7 @@ struct SERVER_EXPORT JackEngineControl : public JackShmMem
fTimeOut = (timeout > 0);
fTimeOutUsecs = timeout * 1000;
fRealTime = rt;
fFWRealTime = false;
fServerPriority = priority;
fClientPriority = (rt) ? priority - 5 : 0;
fMaxClientPriority = (rt) ? priority - 1 : 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment