Erase the entire buffer on reset instead of just what's in 'front'
This commit is contained in:
parent
7128daf79e
commit
e3ac4b22c3
@ -51,8 +51,13 @@ void Detector::clear ()
|
|||||||
dec_data.params.kin = qMin ((msInPeriod * m_frameRate) / 1000, static_cast<unsigned> (sizeof (dec_data.d2) / sizeof (dec_data.d2[0])));
|
dec_data.params.kin = qMin ((msInPeriod * m_frameRate) / 1000, static_cast<unsigned> (sizeof (dec_data.d2) / sizeof (dec_data.d2[0])));
|
||||||
m_bufferPos = m_samplesPerFFT;
|
m_bufferPos = m_samplesPerFFT;
|
||||||
|
|
||||||
|
#if 0
|
||||||
// erase everything after kin.
|
// erase everything after kin.
|
||||||
memset(dec_data.d2 + dec_data.params.kin, 0, sizeof(dec_data.d2) - (sizeof(dec_data.d2[0]) * dec_data.params.kin));
|
//memset(dec_data.d2 + dec_data.params.kin, 0, sizeof(dec_data.d2) - (sizeof(dec_data.d2[0]) * dec_data.params.kin));
|
||||||
|
#else
|
||||||
|
// erase everything
|
||||||
|
memset(dec_data.d2, 0, sizeof(dec_data.d2) - (sizeof(dec_data.d2[0])));
|
||||||
|
#endif
|
||||||
|
|
||||||
qDebug() << "advancing detector buffer from" << prevKin << "to" << dec_data.params.kin << "delta" << dec_data.params.kin - prevKin;
|
qDebug() << "advancing detector buffer from" << prevKin << "to" << dec_data.params.kin << "delta" << dec_data.params.kin - prevKin;
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user