Browse Source

Use generic JackSleep

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2508 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
8161dde65f
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      common/JackAudioDriver.cpp
  2. +1
    -1
      common/JackDummyDriver.cpp

+ 2
- 2
common/JackAudioDriver.cpp View File

@@ -187,8 +187,8 @@ int JackAudioDriver::ProcessNull()
{
JackDriver::CycleTakeTime();
int wait_time = (int((float(fEngineControl->fBufferSize) / (float(fEngineControl->fSampleRate))) * 1000000.0f));
usleep(wait_time);
int wait_time_usec = (int((float(fEngineControl->fBufferSize) / (float(fEngineControl->fSampleRate))) * 1000000.0f));
JackSleep(wait_time_usec);
if (!fEngine->Process(fLastWaitUst)) // fLastWaitUst is set in the "low level" layer
jack_error("JackAudioDriver::ProcessNull Process error");


+ 1
- 1
common/JackDummyDriver.cpp View File

@@ -67,7 +67,7 @@ int JackDummyDriver::Process()
{
JackDriver::CycleTakeTime();
JackAudioDriver::Process();
usleep(std::max(0L, long(fWaitTime - (GetMicroSeconds() - fLastWaitUst))));
JackSleep(std::max(0L, long(fWaitTime - (GetMicroSeconds() - fLastWaitUst))));
return 0;
}



Loading…
Cancel
Save