Revision 7:32defdb2f9d9 CepstrumPitchTracker.h

View differences:

CepstrumPitchTracker.h
75 75
    int m_binTo;
76 76
    int m_bins; // count of "interesting" bins, those returned in m_cepOutput
77 77

  
78
    class Hypothesis {
79

  
80
    public:
81
        struct Estimate {
82
            double freq;
83
            Vamp::RealTime time;
84
        };
85
        typedef std::vector<Estimate> Estimates;
86
        
87
        Hypothesis(Estimate s);
88
        ~Hypothesis();
89

  
90
        enum State {
91
            Provisional,
92
            Satisfied,
93
            Rejected,
94
            Expired
95
        };
96

  
97
        bool test(Estimate);
98
        State getState();
99

  
100
        Estimates getAcceptedEstimates();
101

  
102
    private:
103
        bool isWithinTolerance(Estimate);
104
        bool isSatisfied();
105

  
106
        State m_state;
107
        Estimates m_pending;
108
        int m_age;
109
    };
110

  
111
    typedef std::vector<Hypothesis> Hypotheses;
112
    Hypotheses m_possible;
113
    Hypothesis *m_accepted;
114

  
78 115
    double **m_history;
79 116
    
80 117
    int m_prevpeak;

Also available in: Unified diff