macroInt: add hasRelease variable
This commit is contained in:
parent
6095255fce
commit
af0103d76e
|
@ -101,6 +101,7 @@ void DivMacroInt::init(DivInstrument* which) {
|
||||||
macroListLen=0;
|
macroListLen=0;
|
||||||
subTick=1;
|
subTick=1;
|
||||||
|
|
||||||
|
hasRelease=false;
|
||||||
released=false;
|
released=false;
|
||||||
|
|
||||||
if (ins==NULL) return;
|
if (ins==NULL) return;
|
||||||
|
@ -236,7 +237,12 @@ void DivMacroInt::init(DivInstrument* which) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i=0; i<macroListLen; i++) {
|
for (size_t i=0; i<macroListLen; i++) {
|
||||||
|
if (macroSource[i]!=NULL) {
|
||||||
macroList[i]->prepare(*macroSource[i],e);
|
macroList[i]->prepare(*macroSource[i],e);
|
||||||
|
hasRelease=(macroSource[i]->rel>=0 && macroSource[i]->rel<macroSource[i]->len);
|
||||||
|
} else {
|
||||||
|
hasRelease=false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,9 @@ class DivMacroInt {
|
||||||
ksr() {}
|
ksr() {}
|
||||||
} op[4];
|
} op[4];
|
||||||
|
|
||||||
|
// state
|
||||||
|
bool hasRelease;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* trigger macro release.
|
* trigger macro release.
|
||||||
*/
|
*/
|
||||||
|
@ -149,7 +152,8 @@ class DivMacroInt {
|
||||||
ex5(),
|
ex5(),
|
||||||
ex6(),
|
ex6(),
|
||||||
ex7(),
|
ex7(),
|
||||||
ex8() {
|
ex8(),
|
||||||
|
hasRelease(false) {
|
||||||
memset(macroList,0,128*sizeof(void*));
|
memset(macroList,0,128*sizeof(void*));
|
||||||
memset(macroSource,0,128*sizeof(void*));
|
memset(macroSource,0,128*sizeof(void*));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue