Mercurial > hg > cepstral-pitchtracker
diff CepstrumPitchTracker.cpp @ 12:1daaf43a5459 track
Make it, at least broadly, work
author | Chris Cannam |
---|---|
date | Sat, 30 Jun 2012 10:10:05 +0100 |
parents | c938c60de2de |
children | 6f73de098d35 |
line wrap: on
line diff
--- a/CepstrumPitchTracker.cpp Fri Jun 29 21:11:37 2012 +0100 +++ b/CepstrumPitchTracker.cpp Sat Jun 30 10:10:05 2012 +0100 @@ -118,6 +118,12 @@ return m_state; } +int +CepstrumPitchTracker::Hypothesis::getPendingLength() +{ + return m_pending.size(); +} + CepstrumPitchTracker::Hypothesis::Estimates CepstrumPitchTracker::Hypothesis::getAcceptedEstimates() { @@ -492,8 +498,13 @@ break; } } + if (m_accepted.getState() == Hypothesis::Expired) { m_accepted.addFeatures(fs[0]); + } + + if (m_accepted.getState() == Hypothesis::Expired || + m_accepted.getState() == Hypothesis::Rejected) { if (candidate >= 0) { m_accepted = m_possible[candidate]; } else { @@ -501,6 +512,10 @@ } } + std::cerr << "accepted length = " << m_accepted.getPendingLength() + << ", state = " << m_accepted.getState() + << ", hypothesis count = " << m_possible.size() << std::endl; + //!!! and also need to reap rejected/expired hypotheses from the list }