Revision 13:6f73de098d35 CepstrumPitchTracker.cpp

View differences:

CepstrumPitchTracker.cpp
489 489
    }
490 490

  
491 491
    if (!m_accepted.test(e)) {
492

  
492 493
        int candidate = -1;
494
        bool accepted = false;
495

  
493 496
        for (int i = 0; i < m_possible.size(); ++i) {
494 497
            if (m_possible[i].test(e)) {
498
                accepted = true;
495 499
                if (m_possible[i].getState() == Hypothesis::Satisfied) {
496 500
                    candidate = i;
497 501
                }
......
499 503
            }
500 504
        }
501 505

  
506
        if (!accepted) {
507
            Hypothesis h;
508
            h.test(e); //!!! must succeed as h is new, so perhaps there should be a ctor for this
509
            m_possible.push_back(h);
510
        }
511

  
502 512
        if (m_accepted.getState() == Hypothesis::Expired) {
503 513
            m_accepted.addFeatures(fs[0]);
504 514
        }

Also available in: Unified diff