I'm working with an OpenViBE version downloaded around Octomber 15, 2010 and, in my driver code I try to use the code suggested by you on
http://openvibe.inria.fr/documentation/ ... ction.html
Code: Select all
boolean CDriverFooBarDevice::loop(void)
{
if(!m_rDriverContext.isConnected())
return false;
if(m_rDriverContext.isStarted())
{
//... read data from device and fill the buffer
m_pCallback->setSamples(m_pSample);
// The jitter can be negative or positive !
if(m_rDriverContext.getDriftSampleCount()
> m_rDriverContext.getDriftToleranceSampleCount()
|| m_rDriverContext.getDriftSampleCount()
< - m_rDriverContext.getDriftToleranceSampleCount())
{
m_rDriverContext.getLogManager()
<< LogLevel_Trace
<< "Drift detected: "
<< m_rDriverContext.getDriftSampleCount()
<<" samples.\n";
m_rDriverContext.getLogManager()
<< LogLevel_Trace
<< "Suggested correction: "
<< m_rDriverContext
.getSuggestedDriftCorrectionSampleCount()
<<" samples.\n";
if(! m_rDriverContext
.correctDriftSampleCount(
m_rDriverContext
.getSuggestedDriftCorrectionSampleCount()))
{
m_rDriverContext.getLogManager()
<< LogLevel_Error
<< "ERROR while correcting drift.\n";
}
}
}
return true;
}
It worked in a previous version but presently some errors occurred.
EX. on m_rDriverContext.getJitterSampleCount() etc.
Can you help me to solve this situation?
Gelu