/[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 2938 by schoenebeck, Mon Jul 11 17:10:40 2016 UTC revision 3306 by schoenebeck, Tue Jul 11 15:50:05 2017 UTC
# Line 317  namespace LinuxSampler { Line 317  namespace LinuxSampler {
317              }*/              }*/
318    
319              /**              /**
320                 * Make sure the passed MIDI key is part of the list of active keys,
321                 * if it is not already, then add it to that list. Accordingly it is
322                 * safe to call this method even if the requested key is already
323                 * marked as active.
324                 */
325                void markKeyAsActive(MidiKey* pKey) {
326                    if (!pKey->Active) { // mark as active key
327                        pKey->Active = true;
328                        pKey->itSelf = pActiveKeys->allocAppend();
329                        const int iKey = pKey - &pMIDIKeyInfo[0];
330                        *pKey->itSelf = iKey;
331                    }
332                }
333    
334                /**
335               *  Removes the given voice from the MIDI key's list of active voices.               *  Removes the given voice from the MIDI key's list of active voices.
336               *  This method will be called when a voice went inactive, e.g. because               *  This method will be called when a voice went inactive, e.g. because
337               *  it finished to playback its sample, finished its release stage or               *  it finished to playback its sample, finished its release stage or
# Line 367  namespace LinuxSampler { Line 382  namespace LinuxSampler {
382              /**              /**
383               * Free all keys which have no active voices left               * Free all keys which have no active voices left
384               */               */
385              void FreeAllInactiveKyes() {              void FreeAllInactiveKeys() {
386                  RTList<uint>::Iterator iuiKey = pActiveKeys->first();                  RTList<uint>::Iterator iuiKey = pActiveKeys->first();
387                  RTList<uint>::Iterator end    = pActiveKeys->end();                  RTList<uint>::Iterator end    = pActiveKeys->end();
388                  while (iuiKey != end) { // iterate through all active keys                  while (iuiKey != end) { // iterate through all active keys

Legend:
Removed from v.2938  
changed lines
  Added in v.3306

  ViewVC Help
Powered by ViewVC