comparison NoteHypothesis.cpp @ 66:7ad142c710c6 parameters

Add some parameters
author Chris Cannam
date Fri, 30 Aug 2013 15:35:49 +0100
parents c06fe5350b34
children
comparison
equal deleted inserted replaced
65:9e414ae1f2fb 66:7ad142c710c6
26 26
27 #include <cmath> 27 #include <cmath>
28 28
29 using Vamp::RealTime; 29 using Vamp::RealTime;
30 30
31 NoteHypothesis::NoteHypothesis() 31 NoteHypothesis::NoteHypothesis(float slack) :
32 { 32 m_state(New),
33 m_state = New; 33 m_slack(slack)
34 {
34 } 35 }
35 36
36 NoteHypothesis::~NoteHypothesis() 37 NoteHypothesis::~NoteHypothesis()
37 { 38 {
38 } 39 }
63 bool 64 bool
64 NoteHypothesis::isOutOfDateFor(Estimate s) const 65 NoteHypothesis::isOutOfDateFor(Estimate s) const
65 { 66 {
66 if (m_pending.empty()) return false; 67 if (m_pending.empty()) return false;
67 return ((s.time - m_pending[m_pending.size()-1].time) > 68 return ((s.time - m_pending[m_pending.size()-1].time) >
68 RealTime::fromMilliseconds(40)); 69 RealTime::fromMilliseconds(m_slack));
69 } 70 }
70 71
71 bool 72 bool
72 NoteHypothesis::isSatisfied() const 73 NoteHypothesis::isSatisfied() const
73 { 74 {