Revision 12:1daaf43a5459
| CepstrumPitchTracker.cpp | ||
|---|---|---|
| 118 | 118 |
return m_state; |
| 119 | 119 |
} |
| 120 | 120 |
|
| 121 |
int |
|
| 122 |
CepstrumPitchTracker::Hypothesis::getPendingLength() |
|
| 123 |
{
|
|
| 124 |
return m_pending.size(); |
|
| 125 |
} |
|
| 126 |
|
|
| 121 | 127 |
CepstrumPitchTracker::Hypothesis::Estimates |
| 122 | 128 |
CepstrumPitchTracker::Hypothesis::getAcceptedEstimates() |
| 123 | 129 |
{
|
| ... | ... | |
| 492 | 498 |
break; |
| 493 | 499 |
} |
| 494 | 500 |
} |
| 501 |
|
|
| 495 | 502 |
if (m_accepted.getState() == Hypothesis::Expired) {
|
| 496 | 503 |
m_accepted.addFeatures(fs[0]); |
| 504 |
} |
|
| 505 |
|
|
| 506 |
if (m_accepted.getState() == Hypothesis::Expired || |
|
| 507 |
m_accepted.getState() == Hypothesis::Rejected) {
|
|
| 497 | 508 |
if (candidate >= 0) {
|
| 498 | 509 |
m_accepted = m_possible[candidate]; |
| 499 | 510 |
} else {
|
| ... | ... | |
| 501 | 512 |
} |
| 502 | 513 |
} |
| 503 | 514 |
|
| 515 |
std::cerr << "accepted length = " << m_accepted.getPendingLength() |
|
| 516 |
<< ", state = " << m_accepted.getState() |
|
| 517 |
<< ", hypothesis count = " << m_possible.size() << std::endl; |
|
| 518 |
|
|
| 504 | 519 |
//!!! and also need to reap rejected/expired hypotheses from the list |
| 505 | 520 |
} |
| 506 | 521 |
|
| CepstrumPitchTracker.h | ||
|---|---|---|
| 101 | 101 |
|
| 102 | 102 |
State getState(); |
| 103 | 103 |
|
| 104 |
int getPendingLength(); |
|
| 104 | 105 |
Estimates getAcceptedEstimates(); |
| 105 | 106 |
|
| 106 | 107 |
void addFeatures(FeatureList &fl); |
Also available in: Unified diff