156 |
} |
} |
157 |
|
|
158 |
void Reset() { |
void Reset() { |
159 |
if (pActiveVoices) pActiveVoices->clear(); |
if (pActiveVoices) { |
160 |
|
RTListVoiceIterator itVoice = pActiveVoices->first(); |
161 |
|
RTListVoiceIterator itVoicesEnd = pActiveVoices->end(); |
162 |
|
for (; itVoice != itVoicesEnd; ++itVoice) { // iterate through all voices on this key |
163 |
|
itVoice->VoiceFreed(); |
164 |
|
} |
165 |
|
pActiveVoices->clear(); |
166 |
|
} |
167 |
if (pEvents) pEvents->clear(); |
if (pEvents) pEvents->clear(); |
168 |
KeyPressed = false; |
KeyPressed = false; |
169 |
Active = false; |
Active = false; |
502 |
iPendingStreamDeletions++; |
iPendingStreamDeletions++; |
503 |
} |
} |
504 |
// free the voice to the voice pool and update key info |
// free the voice to the voice pool and update key info |
505 |
|
itVoice->VoiceFreed(); |
506 |
FreeVoice(itVoice); |
FreeVoice(itVoice); |
507 |
} |
} |
508 |
} |
} |