--- linuxsampler/trunk/src/engines/common/MidiKeyboardManager.h 2011/08/17 09:09:17 2243 +++ linuxsampler/trunk/src/engines/common/MidiKeyboardManager.h 2011/08/18 11:32:33 2244 @@ -156,7 +156,14 @@ } void Reset() { - if (pActiveVoices) pActiveVoices->clear(); + if (pActiveVoices) { + RTListVoiceIterator itVoice = pActiveVoices->first(); + RTListVoiceIterator itVoicesEnd = pActiveVoices->end(); + for (; itVoice != itVoicesEnd; ++itVoice) { // iterate through all voices on this key + itVoice->VoiceFreed(); + } + pActiveVoices->clear(); + } if (pEvents) pEvents->clear(); KeyPressed = false; Active = false; @@ -495,6 +502,7 @@ iPendingStreamDeletions++; } // free the voice to the voice pool and update key info + itVoice->VoiceFreed(); FreeVoice(itVoice); } }