1 |
/* -*- c++ -*- |
/* -*- c++ -*- |
2 |
* |
* |
3 |
* Copyright (c) 2014 - 2016 Christian Schoenebeck and Andreas Persson |
* Copyright (c) 2014 - 2017 Christian Schoenebeck and Andreas Persson |
4 |
* |
* |
5 |
* http://www.linuxsampler.org |
* http://www.linuxsampler.org |
6 |
* |
* |
20 |
#include <iostream> |
#include <iostream> |
21 |
#include <map> |
#include <map> |
22 |
#include <set> |
#include <set> |
23 |
|
#include <string.h> // for memset() |
24 |
#include "../common/global.h" |
#include "../common/global.h" |
25 |
#include "../common/Ref.h" |
#include "../common/Ref.h" |
26 |
#include "../common/ArrayList.h" |
#include "../common/ArrayList.h" |
341 |
bool isAssignable() const OVERRIDE { return dynVar->isAssignable(); } |
bool isAssignable() const OVERRIDE { return dynVar->isAssignable(); } |
342 |
bool isPolyphonic() const OVERRIDE { return false; } |
bool isPolyphonic() const OVERRIDE { return false; } |
343 |
void assign(Expression* expr) OVERRIDE { dynVar->assignExpr(expr); } |
void assign(Expression* expr) OVERRIDE { dynVar->assignExpr(expr); } |
344 |
|
VMIntArrayExpr* asIntArray() const OVERRIDE { return dynVar->asIntArray(); } |
345 |
int evalInt() OVERRIDE; |
int evalInt() OVERRIDE; |
346 |
String evalStr() OVERRIDE; |
String evalStr() OVERRIDE; |
347 |
String evalCastToStr() OVERRIDE; |
String evalCastToStr() OVERRIDE; |
356 |
public: |
public: |
357 |
FunctionCall(const char* function, ArgsRef args, VMFunction* fn) : |
FunctionCall(const char* function, ArgsRef args, VMFunction* fn) : |
358 |
functionName(function), args(args), fn(fn) { } |
functionName(function), args(args), fn(fn) { } |
359 |
void dump(int level = 0); |
void dump(int level = 0) OVERRIDE; |
360 |
StmtFlags_t exec(); |
StmtFlags_t exec() OVERRIDE; |
361 |
int evalInt(); |
int evalInt() OVERRIDE; |
362 |
VMIntArrayExpr* asIntArray() const OVERRIDE; |
VMIntArrayExpr* asIntArray() const OVERRIDE; |
363 |
String evalStr(); |
String evalStr() OVERRIDE; |
364 |
bool isConstExpr() const { return false; } |
bool isConstExpr() const OVERRIDE { return false; } |
365 |
ExprType_t exprType() const; |
ExprType_t exprType() const OVERRIDE; |
366 |
String evalCastToStr(); |
String evalCastToStr() OVERRIDE; |
367 |
bool isPolyphonic() const { return args->isPolyphonic(); } |
bool isPolyphonic() const OVERRIDE { return args->isPolyphonic(); } |
368 |
protected: |
protected: |
369 |
VMFnResult* execVMFn(); |
VMFnResult* execVMFn(); |
370 |
}; |
}; |
710 |
int suspensionTimeMicroseconds() const OVERRIDE { |
int suspensionTimeMicroseconds() const OVERRIDE { |
711 |
return suspendMicroseconds; |
return suspendMicroseconds; |
712 |
} |
} |
713 |
|
|
714 |
|
void resetPolyphonicData() OVERRIDE { |
715 |
|
if (polyphonicIntMemory.empty()) return; |
716 |
|
memset(&polyphonicIntMemory[0], 0, polyphonicIntMemory.size() * sizeof(int)); |
717 |
|
} |
718 |
}; |
}; |
719 |
|
|
720 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |