Browse Source

RT scheduling for OSX thread (wheen use in dummy driver).

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2010 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.71
sletz 17 years ago
parent
commit
1e6b473003
3 changed files with 8 additions and 1 deletions
  1. +1
    -0
      ChangeLog
  2. +5
    -1
      common/JackEngineControl.h
  3. +2
    -0
      common/JackThreadedDriver.cpp

+ 1
- 0
ChangeLog View File

@@ -23,6 +23,7 @@ Fernando Lopez-Lezcano
2008-03-14 Stephane Letz <letz@grame.fr> 2008-03-14 Stephane Letz <letz@grame.fr>
* Add -L (extra output latency in aynchronous mode) in CoreAudio driver. * Add -L (extra output latency in aynchronous mode) in CoreAudio driver.
* RT scheduling for OSX thread (wheen use in dummy driver).


2008-03-14 Stephane Letz <letz@grame.fr> 2008-03-14 Stephane Letz <letz@grame.fr>


+ 5
- 1
common/JackEngineControl.h View File

@@ -95,7 +95,7 @@ struct JackEngineControl : public JackShmMem
int fRollingInterval; int fRollingInterval;
float fCPULoad; float fCPULoad;


// Fos OSX thread
// For OSX thread
UInt64 fPeriod; UInt64 fPeriod;
UInt64 fComputation; UInt64 fComputation;
UInt64 fConstraint; UInt64 fConstraint;
@@ -122,6 +122,10 @@ struct JackEngineControl : public JackShmMem
ClearTimeMeasures(); ClearTimeMeasures();
ResetRollingUsecs(); ResetRollingUsecs();
snprintf(fServerName, sizeof(fServerName), server_name); snprintf(fServerName, sizeof(fServerName), server_name);
// For OSX thread
fPeriod = 0;
fComputation = 500 * 1000;
fConstraint = 500 * 1000;
} }
~JackEngineControl() ~JackEngineControl()
{} {}


+ 2
- 0
common/JackThreadedDriver.cpp View File

@@ -59,6 +59,8 @@ int JackThreadedDriver::Start()


if (fDriver->IsRealTime()) { if (fDriver->IsRealTime()) {
jack_log("JackThreadedDriver::Start IsRealTime"); jack_log("JackThreadedDriver::Start IsRealTime");
// Will do "something" on OSX only...
fThread->SetParams(GetEngineControl()->fPeriod, GetEngineControl()->fComputation, GetEngineControl()->fConstraint);
if (fThread->AcquireRealTime(GetEngineControl()->fPriority) < 0) if (fThread->AcquireRealTime(GetEngineControl()->fPriority) < 0)
jack_error("AcquireRealTime error"); jack_error("AcquireRealTime error");
} }


Loading…
Cancel
Save