Revision 62:7c463642a0a7 NoteHypothesis.cpp

View differences:

NoteHypothesis.cpp
64 64
NoteHypothesis::isOutOfDateFor(Estimate s) const
65 65
{
66 66
    if (m_pending.empty()) return false;
67

  
68 67
    return ((s.time - m_pending[m_pending.size()-1].time) > 
69 68
            RealTime::fromMilliseconds(40));
70 69
}
......
80 79
    }
81 80
    meanConfidence /= m_pending.size();
82 81

  
83
    int lengthRequired = 10000;
82
    int lengthRequired = 100;
84 83
    if (meanConfidence > 0.0) {
85 84
        lengthRequired = int(2.0 / meanConfidence + 0.5);
86 85
    }
......
93 92
{
94 93
    bool accept = false;
95 94

  
95
    static double negligibleConfidence = 0.0001;
96

  
97
    if (s.confidence < negligibleConfidence) {
98
        // avoid piling up a lengthy sequence of estimates that are
99
        // all acceptable but are in total not enough to cause us to
100
        // be satisfied
101
        if (m_pending.empty()) {
102
            m_state = Rejected;
103
        }
104
        return false;
105
    }
106

  
96 107
    switch (m_state) {
97 108

  
98 109
    case New:

Also available in: Unified diff