/[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 2970 by schoenebeck, Thu Jul 21 16:22:55 2016 UTC revision 2972 by schoenebeck, Fri Jul 22 14:37:34 2016 UTC
# Line 99  VMFnResult* CoreVMFunction_exit::exec(VM Line 99  VMFnResult* CoreVMFunction_exit::exec(VM
99  VMFnResult* CoreVMFunction_wait::exec(VMFnArgs* args) {  VMFnResult* CoreVMFunction_wait::exec(VMFnArgs* args) {
100      ExecContext* ctx = dynamic_cast<ExecContext*>(vm->currentVMExecContext());      ExecContext* ctx = dynamic_cast<ExecContext*>(vm->currentVMExecContext());
101      VMIntExpr* expr = dynamic_cast<VMIntExpr*>(args->arg(0));      VMIntExpr* expr = dynamic_cast<VMIntExpr*>(args->arg(0));
102      ctx->suspendMicroseconds = expr->evalInt();      int us = expr->evalInt();
103      this->result.flags = STMT_SUSPEND_SIGNALLED;      if (us < 0) {
104            wrnMsg("wait(): argument may not be negative! Aborting script!");
105            this->result.flags = STMT_ABORT_SIGNALLED;
106        } else if (us == 0) {
107            wrnMsg("wait(): argument may not be zero! Aborting script!");
108            this->result.flags = STMT_ABORT_SIGNALLED;
109        } else {
110            ctx->suspendMicroseconds = us;
111            this->result.flags = STMT_SUSPEND_SIGNALLED;
112        }
113      return &result;      return &result;
114  }  }
115    

Legend:
Removed from v.2970  
changed lines
  Added in v.2972

  ViewVC Help
Powered by ViewVC