debug: Inflated 3688 byte code string into 900 codes
debug: Starting query with 900 codes
debug: Matched 2 tracks, top code overlap is 107
debug: No matched tracks after score adjustment
debug: Completed lookup in 24ms. success=false, status=NO_RESULTS_HISTOGRAM_DECREASED
-(void) updateWithPCMSamples:(const float *)pcm numberOfSamples:(unsigned int)numSamples startOffset:(int)start_offset {
Whitening *pWhitening = new Whitening(pcm, numSamples);
pWhitening->Compute();
AudioBufferInput *pAudio = new AudioBufferInput();
pAudio->SetBuffer(pWhitening->getWhitenedSamples(), pWhitening->getNumSamples());
SubbandAnalysis *pSubbandAnalysis = new SubbandAnalysis(pAudio);
pSubbandAnalysis->Compute();
Fingerprint *pFingerprint = new Fingerprint(pSubbandAnalysis, start_offset);
pFingerprint->Compute();
vector<FPCode>& newCodes = pFingerprint->getCodes()
;
if (self.popFrames) {
_codes.erase(_codes.begin(), _codes.begin() + newCodes.size());
}
if (self.codes.size() == 0) {
_codes.reserve(_codes.size()+newCodes.size()); // Reserve space first
_codes.insert(_codes.end(),newCodes.begin(),newCodes.end());
}
else {
_codes.reserve(_codes.size()+newCodes.size()); // Reserve space first
_codes.insert(_codes.end(),newCodes.begin(),newCodes.end());
// self.codes.insert(self.codes.end(), newCodes.begin(), newCodes.end());
}
delete pSubbandAnalysis;
delete pAudio;
delete pWhitening;
delete pFingerprint;
}
I am not using the offset at all. I up date my buffer 10 seconds at a time (30 seconds max). I am trying to add codes to the back end of the of the vector as they are being decoded. The mic is recording in 11025 mono floats. And it appears my samples are perfectly fine.. I am getting lots of samples matched. I do wonder if my algorithm is correct and should i be updating the offset each time i come in? Right no its always 0. Should it reflect 0 the first time then 10 the next. This is an attempt at over the air on an iPad and i'm concerned that its never finding enough time matches to make the connection even though the samples max overlap is 11% which is more than my 10% defined. If anyone has any experience with the node JS version of the server i would love the help as to where to look for this issue.