118 |
itKillEvent = Pool<Event>::Iterator(); |
itKillEvent = Pool<Event>::Iterator(); |
119 |
MidiKeyBase* pKeyInfo = GetMidiKeyInfo(MIDIKey()); |
MidiKeyBase* pKeyInfo = GetMidiKeyInfo(MIDIKey()); |
120 |
|
|
121 |
pGroupEvents = iKeyGroup ? pEngineChannel->ActiveKeyGroups[iKeyGroup] : 0; |
// when editing key groups with an instrument editor while sound was |
122 |
|
// already loaded, ActiveKeyGroups may not have the KeyGroup in question |
123 |
|
// so use find() here instead of array subscript operator[] to avoid an |
124 |
|
// implied creation of a NULL entry, to prevent a crash while editing |
125 |
|
// instruments |
126 |
|
{ |
127 |
|
AbstractEngineChannel::ActiveKeyGroupMap::const_iterator it = |
128 |
|
pEngineChannel->ActiveKeyGroups.find(iKeyGroup); |
129 |
|
pGroupEvents = |
130 |
|
(iKeyGroup && it != pEngineChannel->ActiveKeyGroups.end()) ? |
131 |
|
it->second : NULL; |
132 |
|
} |
133 |
|
|
134 |
SmplInfo = GetSampleInfo(); |
SmplInfo = GetSampleInfo(); |
135 |
RgnInfo = GetRegionInfo(); |
RgnInfo = GetRegionInfo(); |