/[svn]/linuxsampler/trunk/src/engines/common/MidiKeyboardManager.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/MidiKeyboardManager.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2043 by persson, Sat Jan 9 09:37:01 2010 UTC revision 2063 by persson, Sun Feb 28 07:28:56 2010 UTC
# Line 288  namespace LinuxSampler { Line 288  namespace LinuxSampler {
288                      // free the voice object                      // free the voice object
289                      pKey->pActiveVoices->free(itVoice);                      pKey->pActiveVoices->free(itVoice);
290    
291                      // if no other voices left and member of a key group, remove from key group                      // if member of a key group and no other non-release-trigger
292                      if (pKey->pActiveVoices->isEmpty() && keygroup) {                      // voices left, remove from key group
293                          uint** ppKeyGroup = &ActiveKeyGroups[keygroup];                      if (keygroup) {
294                          if (*ppKeyGroup == &*pKey->itSelf) *ppKeyGroup = NULL; // remove key from key group                          RTListVoiceIterator it = pKey->pActiveVoices->first();
295                            RTListVoiceIterator end = pKey->pActiveVoices->end();
296                            for (; it != end ; ++it) {
297                                if (it->Type != V::type_release_trigger) break;
298                            }
299                            if (it == end) {
300                                uint** ppKeyGroup = &ActiveKeyGroups[keygroup];
301                                if (*ppKeyGroup == &*pKey->itSelf) *ppKeyGroup = NULL; // remove key from key group
302                            }
303                      }                      }
304                  }                  }
305                  else std::cerr << "Couldn't release voice! (!itVoice)\n" << std::flush;                  else std::cerr << "Couldn't release voice! (!itVoice)\n" << std::flush;

Legend:
Removed from v.2043  
changed lines
  Added in v.2063

  ViewVC Help
Powered by ViewVC