Browse Source

Tim Blechmann patches.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1818 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.70
sletz 17 years ago
parent
commit
f7be5746e6
3 changed files with 15 additions and 4 deletions
  1. +4
    -0
      ChangeLog
  2. +10
    -3
      common/JackEngineControl.cpp
  3. +1
    -1
      linux/alsa/JackAlsaDriver.cpp

+ 4
- 0
ChangeLog View File

@@ -17,6 +17,10 @@ Tim Blechmann
Jackdmp changes log
---------------------------

2008-02-02 Stephane Letz <letz@grame.fr>

* Tim Blechmann patches.

2008-02-01 Stephane Letz <letz@grame.fr>

* Move transport related methods from JackEngine to JackServer.


+ 10
- 3
common/JackEngineControl.cpp View File

@@ -21,6 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackEngineControl.h"
#include "JackGraphManager.h"
#include "JackClientControl.h"
#include <algorithm>
#include <math.h>

namespace Jack
@@ -60,10 +61,16 @@ void JackEngineControl::ReadFrameTime(JackTimer* timer)
}

// Private
/*
#ifdef WIN32
inline jack_time_t MAX(jack_time_t a, jack_time_t b)
{
return (a < b) ? b : a;
}
#else

#endif
*/

void JackEngineControl::CalcCPULoad(JackClientInterface** table, JackGraphManager* manager)
{
@@ -73,7 +80,7 @@ void JackEngineControl::CalcCPULoad(JackClientInterface** table, JackGraphManage
JackClientInterface* client = table[i];
JackClientTiming* timing = manager->GetClientTiming(i);
if (client && client->GetClientControl()->fActive && timing->fStatus == Finished) {
lastCycleEnd = MAX(lastCycleEnd, timing->fFinishedAt);
lastCycleEnd = std::max(lastCycleEnd, timing->fFinishedAt);
}
}

@@ -92,10 +99,10 @@ void JackEngineControl::CalcCPULoad(JackClientInterface** table, JackGraphManage

jack_time_t maxUsecs = 0;
for (int i = 0; i < JACK_ENGINE_ROLLING_COUNT; i++) {
maxUsecs = MAX(fRollingClientUsecs[i], maxUsecs);
maxUsecs = std::max(fRollingClientUsecs[i], maxUsecs);
}

fMaxUsecs = MAX(fMaxUsecs, maxUsecs);
fMaxUsecs = std::max(fMaxUsecs, maxUsecs);
fSpareUsecs = jack_time_t((maxUsecs < fPeriodUsecs) ? fPeriodUsecs - maxUsecs : 0);
fCPULoad = ((1.f - (float(fSpareUsecs) / float(fPeriodUsecs))) * 50.f + (fCPULoad * 0.5f));
}


+ 1
- 1
linux/alsa/JackAlsaDriver.cpp View File

@@ -2618,7 +2618,7 @@ extern "C"
jack_nframes_t systemic_output_latency = 0;
const JSList * node;
const jack_driver_param_t * param;
char *midi_driver = "none";
const char *midi_driver = "none";

for (node = params; node; node = jack_slist_next (node)) {
param = (const jack_driver_param_t *) node->data;


Loading…
Cancel
Save