comparison data/model/Labeller.h @ 830:2f85f0fbf7ab

Add resetCounters
author Chris Cannam
date Wed, 24 Jul 2013 12:01:43 +0100
parents 6a96bff0bd59
children 59e7fe1b1003
comparison
equal deleted inserted replaced
824:420ade1cb6da 830:2f85f0fbf7ab
132 if (m_counter > m_cycle) m_counter = 1; 132 if (m_counter > m_cycle) m_counter = 1;
133 } 133 }
134 134
135 void setSampleRate(float rate) { m_rate = rate; } 135 void setSampleRate(float rate) { m_rate = rate; }
136 136
137 void resetCounters() {
138 m_counter = 1;
139 m_counter2 = 1;
140 m_cycle = 4;
141 }
142
137 void incrementCounter() { 143 void incrementCounter() {
138 m_counter++; 144 m_counter++;
139 if (m_type == ValueFromCyclicalCounter || 145 if (m_type == ValueFromCyclicalCounter ||
140 m_type == ValueFromTwoLevelCounter) { 146 m_type == ValueFromTwoLevelCounter) {
141 if (m_counter > m_cycle) { 147 if (m_counter > m_cycle) {