Skip to content

Commit

Permalink
detect and ban drift
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioEI committed May 30, 2022
1 parent c8082ad commit 2dd1e93
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions Source/MultiDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ void MultiDetector::process(AudioSampleBuffer& buffer)
// Use globalSample so it is not relative to the buffer
globalSample = 0;


if (isCalibration == true) {

elapsedCalibration++;
Expand Down Expand Up @@ -228,7 +227,6 @@ void MultiDetector::process(AudioSampleBuffer& buffer)
//std::cout << "Sample: " << sample << " Downsample: " << sample/downsampleFactor << " Time: " << (unsigned int)(1000.f * float(tsBuffer + sample) / samplingRate) << std::endl;
//std::cout << "Write: " << roundBufferWriteIndex << " Read: " << roundBufferReadIndex << std::endl;


unsigned int temporalReadIndex = roundBufferReadIndex;
unsigned int oldRoundBufferReadIndex = roundBufferReadIndex;
// Next value to read will be the first upcoming window after stride, if no event is found
Expand Down
2 changes: 1 addition & 1 deletion Source/MultiDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ namespace MultiDetectorSpace
unsigned int roundBufferNumElements;

std::vector<float> predictBuffer;
float predictBufferSum[NUM_CHANNELS];
std::vector<float> predictBufferSum;
unsigned int predictBufferSize;
int effectiveStride;
float thrDrift;
Expand Down

0 comments on commit 2dd1e93

Please sign in to comment.