/[svn]/linuxsampler/trunk/src/scriptvm/CoreVMFunctions.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/CoreVMFunctions.cpp

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

revision 3557 by schoenebeck, Sun Aug 18 00:06:04 2019 UTC revision 3561 by schoenebeck, Fri Aug 23 11:44:00 2019 UTC
# Line 124  VMFnResult* CoreVMFunction_exit::exec(VM Line 124  VMFnResult* CoreVMFunction_exit::exec(VM
124  ///////////////////////////////////////////////////////////////////////////  ///////////////////////////////////////////////////////////////////////////
125  // built-in script function:  wait()  // built-in script function:  wait()
126    
127    bool CoreVMFunction_wait::acceptsArgUnitType(vmint iArg, StdUnit_t type) const {
128        if (iArg == 0)
129            return type == VM_NO_UNIT || type == VM_SECOND;
130        else
131            return type == VM_NO_UNIT;
132    }
133    
134    bool CoreVMFunction_wait::acceptsArgUnitPrefix(vmint iArg) const {
135        return iArg == 0;
136    }
137    
138  VMFnResult* CoreVMFunction_wait::exec(VMFnArgs* args) {  VMFnResult* CoreVMFunction_wait::exec(VMFnArgs* args) {
139      ExecContext* ctx = dynamic_cast<ExecContext*>(vm->currentVMExecContext());      ExecContext* ctx = dynamic_cast<ExecContext*>(vm->currentVMExecContext());
140      VMIntExpr* expr = dynamic_cast<VMIntExpr*>(args->arg(0));      VMIntExpr* expr = dynamic_cast<VMIntExpr*>(args->arg(0));
141      vmint us = expr->evalInt();      vmint us = expr->evalInt(VM_MICRO);
142      if (us < 0) {      if (us < 0) {
143          wrnMsg("wait(): argument may not be negative! Aborting script!");          wrnMsg("wait(): argument may not be negative! Aborting script!");
144          this->result.flags = STMT_ABORT_SIGNALLED;          this->result.flags = STMT_ABORT_SIGNALLED;

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

  ViewVC Help
Powered by ViewVC