/[svn]/linuxsampler/trunk/src/engines/common/InstrumentScriptVM.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/InstrumentScriptVM.cpp

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

revision 3360 by schoenebeck, Fri Oct 27 21:19:18 2017 UTC revision 3557 by schoenebeck, Sun Aug 18 00:06:04 2019 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (c) 2014 - 2017 Christian Schoenebeck   * Copyright (c) 2014 - 2019 Christian Schoenebeck
3   *   *
4   * http://www.linuxsampler.org   * http://www.linuxsampler.org
5   *   *
# Line 20  namespace LinuxSampler { Line 20  namespace LinuxSampler {
20      ///////////////////////////////////////////////////////////////////////      ///////////////////////////////////////////////////////////////////////
21      // class 'EventGroup'      // class 'EventGroup'
22    
23      void EventGroup::insert(int eventID) {      void EventGroup::insert(vmint eventID) {
24          if (contains(eventID)) return;          if (contains(eventID)) return;
25    
26          AbstractEngine* pEngine = m_script->pEngineChannel->pEngine;          AbstractEngine* pEngine = m_script->pEngineChannel->pEngine;
# Line 31  namespace LinuxSampler { Line 31  namespace LinuxSampler {
31          // events die before being removed explicitly from the group by script          // events die before being removed explicitly from the group by script
32          //          //
33          // NOTE: or should we do this "dead ones" check only once in a while?          // NOTE: or should we do this "dead ones" check only once in a while?
34          int firstDead = -1;          ssize_t firstDead = -1;
35          for (int i = 0; i < size(); ++i) {          for (size_t i = 0; i < size(); ++i) {
36              if (firstDead >= 0) {              if (firstDead >= 0) {
37                  if (pEngine->EventByID(eventID)) {                  if (pEngine->EventByID(eventID)) {
38                      remove(firstDead, i - firstDead);                      remove(firstDead, i - firstDead);
# Line 46  namespace LinuxSampler { Line 46  namespace LinuxSampler {
46          append(eventID);          append(eventID);
47      }      }
48    
49      void EventGroup::erase(int eventID) {      void EventGroup::erase(vmint eventID) {
50          int index = find(eventID);          size_t index = find(eventID);
51          remove(index);          remove(index);
52      }      }
53    
# Line 319  namespace LinuxSampler { Line 319  namespace LinuxSampler {
319          return res;          return res;
320      }      }
321    
322      std::map<String,VMIntRelPtr*> InstrumentScriptVM::builtInIntVariables() {      std::map<String,VMIntPtr*> InstrumentScriptVM::builtInIntVariables() {
323          // first get built-in integer variables of derived VM class          // first get built-in integer variables of derived VM class
324          std::map<String,VMIntRelPtr*> m = ScriptVM::builtInIntVariables();          std::map<String,VMIntPtr*> m = ScriptVM::builtInIntVariables();
325    
326          // now add own built-in variables          // now add own built-in variables
327          m["$CC_NUM"] = &m_CC_NUM;          m["$CC_NUM"] = &m_CC_NUM;
# Line 348  namespace LinuxSampler { Line 348  namespace LinuxSampler {
348          return m;          return m;
349      }      }
350    
351      std::map<String,int> InstrumentScriptVM::builtInConstIntVariables() {      std::map<String,vmint> InstrumentScriptVM::builtInConstIntVariables() {
352          // first get built-in integer variables of derived VM class          // first get built-in integer variables of derived VM class
353          std::map<String,int> m = ScriptVM::builtInConstIntVariables();          std::map<String,vmint> m = ScriptVM::builtInConstIntVariables();
354    
355          m["$EVENT_STATUS_INACTIVE"] = EVENT_STATUS_INACTIVE;          m["$EVENT_STATUS_INACTIVE"] = EVENT_STATUS_INACTIVE;
356          m["$EVENT_STATUS_NOTE_QUEUE"] = EVENT_STATUS_NOTE_QUEUE;          m["$EVENT_STATUS_NOTE_QUEUE"] = EVENT_STATUS_NOTE_QUEUE;

Legend:
Removed from v.3360  
changed lines
  Added in v.3557

  ViewVC Help
Powered by ViewVC