Browse Source

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
tags/v1.9.4
sletz 16 years ago
parent
commit
d56018e051
3 changed files with 15 additions and 1 deletions
  1. +4
    -0
      ChangeLog
  2. +9
    -1
      common/JackEngine.cpp
  3. +2
    -0
      common/JackEngineControl.h

+ 4
- 0
ChangeLog View File

@@ -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.


+ 9
- 1
common/JackEngine.cpp View File

@@ -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);
}



+ 2
- 0
common/JackEngineControl.h View File

@@ -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;


Loading…
Cancel
Save