Revision 20:f9c4c4568fb0

View differences:

CepstrumPitchTracker.cpp
530 530
    filter(rawcep, data);
531 531
    delete[] rawcep;
532 532

  
533
    double abstot = 0.0;
534

  
535
    for (int i = 0; i < n; ++i) {
536
	abstot += fabs(data[i]);
537
    }
538

  
539 533
    double maxval = 0.0;
540 534
    int maxbin = -1;
541 535

  
......
566 560

  
567 561
    double confidence = 0.0;
568 562
    if (nextPeakVal != 0.0) {
569
        confidence = ((maxval / nextPeakVal) - 1.0) / 4.0;
563
        confidence = (maxval - nextPeakVal) / 200.0;
570 564
        if (confidence > 1.0) confidence = 1.0;
571 565
    }
572 566

  

Also available in: Unified diff