/[svn]/linuxsampler/trunk/src/engines/gig/EngineChannel.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/EngineChannel.cpp

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

revision 2042 by iliev, Fri Oct 23 17:53:17 2009 UTC revision 2043 by persson, Sat Jan 9 09:37:01 2010 UTC
# Line 123  namespace LinuxSampler { namespace gig { Line 123  namespace LinuxSampler { namespace gig {
123              throw Exception("gig::Engine error: Failed to load instrument, cause: Unknown exception while trying to parse gig file.");              throw Exception("gig::Engine error: Failed to load instrument, cause: Unknown exception while trying to parse gig file.");
124          }          }
125    
126          // rebuild ActiveKeyGroups map with key groups of current instrument          RoundRobinIndex = 0;
127          for (::gig::Region* pRegion = newInstrument->GetFirstRegion(); pRegion; pRegion = newInstrument->GetNextRegion())          for (int i = 0 ; i < 128 ; i++) pMIDIKeyInfo[i].pRoundRobinIndex = NULL;
128    
129            // rebuild ActiveKeyGroups map with key groups of current
130            // instrument and set the round robin pointers to use one
131            // counter for each region
132            int region = 0;
133            for (::gig::Region* pRegion = newInstrument->GetFirstRegion(); pRegion; pRegion = newInstrument->GetNextRegion()) {
134              if (pRegion->KeyGroup) ActiveKeyGroups[pRegion->KeyGroup] = NULL;              if (pRegion->KeyGroup) ActiveKeyGroups[pRegion->KeyGroup] = NULL;
135    
136                RoundRobinIndexes[region] = 0;
137                for (int iKey = pRegion->KeyRange.low; iKey <= pRegion->KeyRange.high; iKey++) {
138                    pMIDIKeyInfo[iKey].pRoundRobinIndex = &RoundRobinIndexes[region];
139                }
140                region++;
141            }
142    
143          InstrumentIdxName = newInstrument->pInfo->Name;          InstrumentIdxName = newInstrument->pInfo->Name;
144          InstrumentStat = 100;          InstrumentStat = 100;
145    

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

  ViewVC Help
Powered by ViewVC