--- linuxsampler/trunk/src/scriptvm/CoreVMFunctions.h 2019/12/26 23:01:09 3677 +++ linuxsampler/trunk/src/scriptvm/CoreVMFunctions.h 2019/12/27 22:46:08 3678 @@ -376,6 +376,34 @@ }; /** + * Implements the built-in msb() script function. + */ +class CoreVMFunction_msb FINAL : public VMIntResultFunction { +public: + StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; } + bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; } + vmint minRequiredArgs() const OVERRIDE { return 1; } + vmint maxAllowedArgs() const OVERRIDE { return 1; } + bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; } + bool acceptsArgFinal(vmint iArg) const OVERRIDE { return false; } + VMFnResult* exec(VMFnArgs* args) OVERRIDE; +}; + +/** + * Implements the built-in lsb() script function. + */ +class CoreVMFunction_lsb FINAL : public VMIntResultFunction { +public: + StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; } + bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; } + vmint minRequiredArgs() const OVERRIDE { return 1; } + vmint maxAllowedArgs() const OVERRIDE { return 1; } + bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; } + bool acceptsArgFinal(vmint iArg) const OVERRIDE { return false; } + VMFnResult* exec(VMFnArgs* args) OVERRIDE; +}; + +/** * Implements the built-in min() script function. */ class CoreVMFunction_min FINAL : public VMNumberResultFunction {