Browse Source

Internally use GetMicroSeconds() instead of jack_get_time().

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3322 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.2
sletz 16 years ago
parent
commit
77237dd172
3 changed files with 9 additions and 7 deletions
  1. +2
    -1
      common/JackAudioAdapter.cpp
  2. +2
    -1
      common/JackAudioAdapterInterface.cpp
  3. +5
    -5
      common/JackNetManager.cpp

+ 2
- 1
common/JackAudioAdapter.cpp View File

@@ -22,6 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackError.h"
#include "JackCompilerDeps.h"
#include "JackTools.h"
#include "JackTime.h"
#include "jslist.h"
#include <stdio.h>
#include <stdlib.h>
@@ -44,7 +45,7 @@ namespace Jack
return 0;

// DLL
adapter->fAudioAdapter->SetCallbackTime ( jack_get_time() );
adapter->fAudioAdapter->SetCallbackTime (GetMicroSeconds());

// Push/pull from ringbuffer
for ( i = 0; i < adapter->fCaptureChannels; i++ )


+ 2
- 1
common/JackAudioAdapterInterface.cpp View File

@@ -18,6 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include "JackAudioAdapter.h"
#include "JackTime.h"
#include <stdio.h>

namespace Jack
@@ -107,7 +108,7 @@ namespace Jack

void JackAudioAdapterInterface::ResampleFactor ( jack_nframes_t& frame1, jack_nframes_t& frame2 )
{
jack_time_t time = jack_get_time();
jack_time_t time = GetMicroSeconds();

if ( !fRunning )
{


+ 5
- 5
common/JackNetManager.cpp View File

@@ -397,7 +397,7 @@ namespace Jack
int res = 0;

#ifdef JACK_MONITOR
jack_time_t begin_time = jack_get_time();
jack_time_t begin_time = GetMicroSeconds();
fNetTimeMon->New();
#endif

@@ -426,7 +426,7 @@ namespace Jack
return SOCKET_ERROR;

#ifdef JACK_MONITOR
fNetTimeMon->Add ( ( ( ( float ) ( jack_get_time() - begin_time ) ) / ( float ) fPeriodUsecs ) * 100.f );
fNetTimeMon->Add ( ( ( ( float ) (GetMicroSeconds() - begin_time ) ) / ( float ) fPeriodUsecs ) * 100.f );
#endif

//send data
@@ -434,7 +434,7 @@ namespace Jack
return SOCKET_ERROR;

#ifdef JACK_MONITOR
fNetTimeMon->Add ( ( ( ( float ) ( jack_get_time() - begin_time ) ) / ( float ) fPeriodUsecs ) * 100.f );
fNetTimeMon->Add ( ( ( ( float ) (GetMicroSeconds() - begin_time ) ) / ( float ) fPeriodUsecs ) * 100.f );
#endif
} else {
@@ -447,7 +447,7 @@ namespace Jack
return res;

#ifdef JACK_MONITOR
fNetTimeMon->Add ( ( ( ( float ) ( jack_get_time() - begin_time ) ) / ( float ) fPeriodUsecs ) * 100.f );
fNetTimeMon->Add ( ( ( ( float ) (GetMicroSeconds() - begin_time ) ) / ( float ) fPeriodUsecs ) * 100.f );
#endif

//decode sync
@@ -460,7 +460,7 @@ namespace Jack
return res;

#ifdef JACK_MONITOR
fNetTimeMon->AddLast ( ( ( ( float ) ( jack_get_time() - begin_time ) ) / ( float ) fPeriodUsecs ) * 100.f );
fNetTimeMon->AddLast ( ( ( ( float ) (GetMicroSeconds() - begin_time ) ) / ( float ) fPeriodUsecs ) * 100.f );
#endif
return 0;
}


Loading…
Cancel
Save