[Clam-devel] Fixing now manifesting debug asserts
Pau Arumi
parumi at iua.upf.edu
Tue Aug 7 09:19:58 PDT 2007
Important Note:
after updating the sandbox you'll need to do scons configure to
compile in debug.
After the previous fix several debug asserts are manifesting. And
this commits fixes the ones I've found so far.
Committed revision 10585.
revision 10585
* SinTracking fix (hopefully)
** When mySearch.Find(currentPeakFreq); returns -1 make found=0
** Not sure about what should be done
revision 10584
* Array Fix: Constructor with parameter (size) should do
Resize(size) after SetSize(size)
** the bug was manifesting in FundFreqDetect in DEBUG
revision 10583
* PeakView: Fix: only return a pointer to data when the array size
is not 0.
The SinTracking bug was the more suspectfull since it seems related
to PitchShift artifacts. The problem was that
mySearch.Find(currentPeakFreq) some times returns -1. I'm not sure
if my fix is correct. Xavier?
--- CLAM/src/Processing/Analysis/SinTracking.cxx (revision
10582)
+++ CLAM/src/Processing/Analysis/SinTracking.cxx (working copy)
@@ -226,6 +226,7 @@
//xamat: test!
SearchArray<TData> mySearch(peakFreqBuffer);
TIndex found=mySearch.Find(currentPeakFreq);
+ if (found==-1) found = 0; //Pau: to avoid assert. Is this the
correct behaviour?
TIndex originalFound = found;
distance = Abs(peakFreqBuffer[found]-currentPeakFreq);
//make sure that the two surrounding peaks are not in fact closer
pau
More information about the clam-devel
mailing list