/[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 2121 by schoenebeck, Tue Sep 14 17:09:08 2010 UTC revision 2448 by schoenebeck, Fri May 3 14:26:32 2013 UTC
# Line 156  namespace LinuxSampler { Line 156  namespace LinuxSampler {
156                  }                  }
157    
158                  void Reset() {                  void Reset() {
159                      if (pActiveVoices) pActiveVoices->clear();                      if (pActiveVoices) {
160                            RTListVoiceIterator itVoice = pActiveVoices->first();
161                            RTListVoiceIterator itVoicesEnd = pActiveVoices->end();
162                            for (; itVoice != itVoicesEnd; ++itVoice) { // iterate through all voices on this key
163                                itVoice->VoiceFreed();
164                            }
165                            pActiveVoices->clear();
166                        }
167                      if (pEvents) pEvents->clear();                      if (pEvents) pEvents->clear();
168                      KeyPressed        = false;                      KeyPressed        = false;
169                      Active            = false;                      Active            = false;
# Line 495  namespace LinuxSampler { Line 502  namespace LinuxSampler {
502                              iPendingStreamDeletions++;                              iPendingStreamDeletions++;
503                          }                          }
504                          // free the voice to the voice pool and update key info                          // free the voice to the voice pool and update key info
505                            itVoice->VoiceFreed();
506                          FreeVoice(itVoice);                          FreeVoice(itVoice);
507                      }                      }
508                  }                  }
# Line 535  namespace LinuxSampler { Line 543  namespace LinuxSampler {
543                      }                      }
544                  }                  }
545              }              }
546                
547                /**
548                 * Recalculate the pitch of all active voices.
549                 */
550                void OnScaleTuningChanged() {
551                    RTList<uint>::Iterator iuiKey = pActiveKeys->first();
552                    for (; iuiKey; ++iuiKey) {
553                        MidiKey* pKey = &pMIDIKeyInfo[*iuiKey];
554                        RTListVoiceIterator itVoice = pKey->pActiveVoices->first();
555                        for (; itVoice; ++itVoice) {
556                            itVoice->onScaleTuningChanged();
557                        }
558                    }
559                }
560                
561              void ProcessSustainPedalDown(Pool<Event>::Iterator& itEvent) {              void ProcessSustainPedalDown(Pool<Event>::Iterator& itEvent) {
562                  // Cancel release process of all voices                  // Cancel release process of all voices
563                  RTList<uint>::Iterator iuiKey = pActiveKeys->first();                  RTList<uint>::Iterator iuiKey = pActiveKeys->first();

Legend:
Removed from v.2121  
changed lines
  Added in v.2448

  ViewVC Help
Powered by ViewVC