1134 |
*/ |
*/ |
1135 |
void AbstractEngineChannel::HandleKeyGroupConflicts(uint KeyGroup, Pool<Event>::Iterator& itNoteOnEvent) { |
void AbstractEngineChannel::HandleKeyGroupConflicts(uint KeyGroup, Pool<Event>::Iterator& itNoteOnEvent) { |
1136 |
dmsg(4,("HandelKeyGroupConflicts KeyGroup=%d\n", KeyGroup)); |
dmsg(4,("HandelKeyGroupConflicts KeyGroup=%d\n", KeyGroup)); |
1137 |
if (KeyGroup) { |
// when editing key groups with an instrument editor while sound was |
1138 |
|
// already loaded, ActiveKeyGroups may not have the KeyGroup in question |
1139 |
|
// so check for that to prevent a crash while editing instruments |
1140 |
|
if (KeyGroup && ActiveKeyGroups.count(KeyGroup)) { |
1141 |
// send a release event to all active voices in the group |
// send a release event to all active voices in the group |
1142 |
RTList<Event>::Iterator itEvent = ActiveKeyGroups[KeyGroup]->allocAppend(pEngine->pEventPool); |
RTList<Event>::Iterator itEvent = ActiveKeyGroups[KeyGroup]->allocAppend(pEngine->pEventPool); |
1143 |
*itEvent = *itNoteOnEvent; |
*itEvent = *itNoteOnEvent; |