/[svn]/linuxsampler/trunk/src/engines/sf2/Engine.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sf2/Engine.cpp

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

revision 2878 by schoenebeck, Sun May 18 17:38:25 2014 UTC revision 2879 by schoenebeck, Tue Apr 19 14:07:53 2016 UTC
# Line 88  namespace LinuxSampler { namespace sf2 { Line 88  namespace LinuxSampler { namespace sf2 {
88          uint8_t  chanaft  = pChannel->ControllerTable[128];          uint8_t  chanaft  = pChannel->ControllerTable[128];
89          uint8_t* cc       = pChannel->ControllerTable;          uint8_t* cc       = pChannel->ControllerTable;
90    
91            NoteIterator itNote = GetNotePool()->fromID(itNoteOnEvent->Param.Note.ID);
92            if (!itNote) {
93                dmsg(1,("sf2::Engine: No Note object for triggering new voices!\n"));
94                return;
95            }
96    
97          int layer = 0;          int layer = 0;
98          ::sf2::Query query(*pChannel->pInstrument);          ::sf2::Query query(*pChannel->pInstrument);
99          query.key = key;          query.key = key;
# Line 103  namespace LinuxSampler { namespace sf2 { Line 109  namespace LinuxSampler { namespace sf2 {
109                  //std::cout << " loKey: " << r->loKey << " hiKey: " << r->hiKey << " minVel: " << r->minVel << " maxVel: " << r->maxVel << " Vel: " << ((int)vel) << std::endl << std::endl;                  //std::cout << " loKey: " << r->loKey << " hiKey: " << r->hiKey << " minVel: " << r->minVel << " maxVel: " << r->maxVel << " Vel: " << ((int)vel) << std::endl << std::endl;
110                  if (!RegionSuspended(r)) {                  if (!RegionSuspended(r)) {
111                      itNoteOnEvent->Param.Note.pRegion = r;                      itNoteOnEvent->Param.Note.pRegion = r;
112                      LaunchVoice(pChannel, itNoteOnEvent, layer, false, true, HandleKeyGroupConflicts);                      VoiceIterator itNewVoice =
113                            LaunchVoice(pChannel, itNoteOnEvent, layer, false, true, HandleKeyGroupConflicts);
114                        if (itNewVoice)
115                            itNewVoice.moveToEndOf(itNote->pActiveVoices);
116                  }                  }
117                  layer++;                  layer++;
118              }              }
# Line 127  namespace LinuxSampler { namespace sf2 { Line 136  namespace LinuxSampler { namespace sf2 {
136      ) {      ) {
137          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);
138          int key = itNoteOnEvent->Param.Note.Key;          int key = itNoteOnEvent->Param.Note.Key;
139          EngineChannel::MidiKey* pKey = &pChannel->pMIDIKeyInfo[key];          //EngineChannel::MidiKey* pKey = &pChannel->pMIDIKeyInfo[key];
140    
141          Voice::type_t VoiceType = Voice::type_normal;          Voice::type_t VoiceType = Voice::type_normal;
142    
# Line 141  namespace LinuxSampler { namespace sf2 { Line 150  namespace LinuxSampler { namespace sf2 {
150          if (HandleKeyGroupConflicts) pChannel->HandleKeyGroupConflicts(iKeyGroup, itNoteOnEvent);          if (HandleKeyGroupConflicts) pChannel->HandleKeyGroupConflicts(iKeyGroup, itNoteOnEvent);
151    
152          // allocate a new voice for the key          // allocate a new voice for the key
153          itNewVoice = pKey->pActiveVoices->allocAppend();          itNewVoice = GetVoicePool()->allocAppend();
154          int res = InitNewVoice (          int res = InitNewVoice (
155                  pChannel, pRgn, itNoteOnEvent, VoiceType, iLayer,                  pChannel, pRgn, itNoteOnEvent, VoiceType, iLayer,
156                  iKeyGroup, ReleaseTriggerVoice, VoiceStealing, itNewVoice                  iKeyGroup, ReleaseTriggerVoice, VoiceStealing, itNewVoice

Legend:
Removed from v.2878  
changed lines
  Added in v.2879

  ViewVC Help
Powered by ViewVC