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

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

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

revision 3296 by schoenebeck, Wed Jun 28 09:45:56 2017 UTC revision 3303 by schoenebeck, Mon Jul 10 17:45:30 2017 UTC
# Line 838  namespace LinuxSampler { Line 838  namespace LinuxSampler {
838    
839      VMFnResult* InstrumentScriptVMFunction_change_attack::exec(VMFnArgs* args) {      VMFnResult* InstrumentScriptVMFunction_change_attack::exec(VMFnArgs* args) {
840          int attack = args->arg(1)->asInt()->evalInt();          int attack = args->arg(1)->asInt()->evalInt();
841          if (attack > VM_EG_PAR_MAX_VALUE) {          // note: intentionally not checking against a max. value here!
842              wrnMsg("change_attack(): argument 2 may not be larger than 1000000");          // (to allow i.e. passing 2000000 for doubling the attack time)
843              attack = VM_EG_PAR_MAX_VALUE;          if (attack < 0) {
         } else if (attack < 0) {  
844              wrnMsg("change_attack(): argument 2 may not be negative");              wrnMsg("change_attack(): argument 2 may not be negative");
845              attack = 0;              attack = 0;
846          }          }
# Line 925  namespace LinuxSampler { Line 924  namespace LinuxSampler {
924    
925      VMFnResult* InstrumentScriptVMFunction_change_decay::exec(VMFnArgs* args) {      VMFnResult* InstrumentScriptVMFunction_change_decay::exec(VMFnArgs* args) {
926          int decay = args->arg(1)->asInt()->evalInt();          int decay = args->arg(1)->asInt()->evalInt();
927          if (decay > VM_EG_PAR_MAX_VALUE) {          // note: intentionally not checking against a max. value here!
928              wrnMsg("change_decay(): argument 2 may not be larger than 1000000");          // (to allow i.e. passing 2000000 for doubling the decay time)
929              decay = VM_EG_PAR_MAX_VALUE;          if (decay < 0) {
         } else if (decay < 0) {  
930              wrnMsg("change_decay(): argument 2 may not be negative");              wrnMsg("change_decay(): argument 2 may not be negative");
931              decay = 0;              decay = 0;
932          }          }
# Line 1012  namespace LinuxSampler { Line 1010  namespace LinuxSampler {
1010    
1011      VMFnResult* InstrumentScriptVMFunction_change_release::exec(VMFnArgs* args) {      VMFnResult* InstrumentScriptVMFunction_change_release::exec(VMFnArgs* args) {
1012          int release = args->arg(1)->asInt()->evalInt();          int release = args->arg(1)->asInt()->evalInt();
1013          if (release > VM_EG_PAR_MAX_VALUE) {          // note: intentionally not checking against a max. value here!
1014              wrnMsg("change_release(): argument 2 may not be larger than 1000000");          // (to allow i.e. passing 2000000 for doubling the release time)
1015              release = VM_EG_PAR_MAX_VALUE;          if (release < 0) {
         } else if (release < 0) {  
1016              wrnMsg("change_release(): argument 2 may not be negative");              wrnMsg("change_release(): argument 2 may not be negative");
1017              release = 0;              release = 0;
1018          }          }

Legend:
Removed from v.3296  
changed lines
  Added in v.3303

  ViewVC Help
Powered by ViewVC