--- linuxsampler/trunk/src/engines/gig/EngineChannel.cpp 2005/03/14 22:35:44 460 +++ linuxsampler/trunk/src/engines/gig/EngineChannel.cpp 2005/03/17 20:13:08 473 @@ -39,6 +39,7 @@ pMIDIKeyInfo[i].Active = false; pMIDIKeyInfo[i].ReleaseTrigger = false; pMIDIKeyInfo[i].pEvents = NULL; // we allocate when we retrieve the right Engine object + pMIDIKeyInfo[i].VoiceTheftsQueued = 0; pMIDIKeyInfo[i].RoundRobinIndex = 0; } for (uint i = 0; i < Event::destination_count; i++) { @@ -69,8 +70,7 @@ GlobalPanRight = 1.0f; CurrentKeyDimension = 0; - // set all MIDI controller values to zero - memset(ControllerTable, 0x00, 128); + ResetControllers(); // reset key info for (uint i = 0; i < 128; i++) { @@ -82,6 +82,7 @@ pMIDIKeyInfo[i].Active = false; pMIDIKeyInfo[i].ReleaseTrigger = false; pMIDIKeyInfo[i].itSelf = Pool::Iterator(); + pMIDIKeyInfo[i].VoiceTheftsQueued = 0; } // reset all key groups @@ -387,6 +388,11 @@ } } + void EngineChannel::ResetControllers() { + // set all MIDI controller values to zero + memset(ControllerTable, 0x00, 128); + } + /** * Copy all events from the engine channel's input event queue buffer to * the internal event list. This will be done at the beginning of each